MitnickP56 Posted April 25, 2016 Share Posted April 25, 2016 Hi. It's my code : function warent ( posX, posY, posZ ) for i ,v in ipairs (getElementsByType("player")) do if getElementData(v,"state") == "alive" then setElementPosition ( v, 200, 150, 15 ) end end end bindKey("enter","down",warent) Idk why not working. Scripts is without debug. 0 errors. Link to comment
Chaos Posted April 25, 2016 Share Posted April 25, 2016 try something like that function warent ( posX, posY, posZ ) for i ,v in ipairs (getElementsByType("player")) do if getElementData(v,"state") == "alive" then local vehicles = getPedOccupiedVehicle ( v ) if vehicles then setElementPosition ( vehicles, 200, 150, 15 ) end end end end bindKey("enter","down",warent) Link to comment
MitnickP56 Posted April 25, 2016 Author Share Posted April 25, 2016 try something like that function warent ( posX, posY, posZ ) for i ,v in ipairs (getElementsByType("player")) do if getElementData(v,"state") == "alive" then local vehicles = getPedOccupiedVehicle ( v ) if vehicles then setElementPosition ( vehicles, 200, 150, 15 ) end end end end bindKey("enter","down",warent) Rly thanks. working One more question. How I can add here blowVehicle? after setElementPosition. Link to comment
Chaos Posted April 25, 2016 Share Posted April 25, 2016 try something like that function warent ( posX, posY, posZ ) for i ,v in ipairs (getElementsByType("player")) do if getElementData(v,"state") == "alive" then local vehicles = getPedOccupiedVehicle ( v ) if vehicles then setElementPosition ( vehicles, 200, 150, 15 ) end end end end bindKey("enter","down",warent) Rly thanks. working One more question. How I can add here blowVehicle? after setElementPosition. function warent ( posX, posY, posZ ) for i ,v in ipairs (getElementsByType("player")) do if getElementData(v,"state") == "alive" then local vehicles = getPedOccupiedVehicle ( v ) if vehicles then setElementPosition ( vehicles, 200, 150, 15 ) blowVehicle(vehicles) end end end end bindKey("enter","down",warent) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now