maxleonardo3 Posted May 4, 2013 Share Posted May 4, 2013 After creating aio player out of the car and create another is on the map has the destroir another function VeiculoVIP() if not isElementInWater(source) then local x, y, z = getElementPosition (source) local carro = createVehicle ( 411, x, y, z ) warpPedIntoVehicle ( source, carro ) end end addEvent("VeiculoVIP", true) addEventHandler("VeiculoVIP", root, VeiculoVIP) Link to comment
Castillo Posted May 4, 2013 Share Posted May 4, 2013 Store the vehicle elements on a table, and use the player element as index, then when he's going to spawn a vehicle, check if he has a car spawned and if so, destroy it. Link to comment
maxleonardo3 Posted May 4, 2013 Author Share Posted May 4, 2013 Did not give me one example Link to comment
Castillo Posted May 4, 2013 Share Posted May 4, 2013 Define a table: -- Global ( outside any function ) local vehicles = { } -- Inside your creation function: vehicles [ client ] = createVehicle ( arguments ) Then you can check if exists a vehicle with: isElement Link to comment
maxleonardo3 Posted May 4, 2013 Author Share Posted May 4, 2013 not to understand still makes me script and passes function VeiculoVIP() if not isElementInWater(source) then local x, y, z = getElementPosition (source) local carro = createVehicle ( 411, x, y, z ) warpPedIntoVehicle ( source, carro ) end end addEvent("VeiculoVIP", true) addEventHandler("VeiculoVIP", root, VeiculoVIP) Link to comment
Castillo Posted May 4, 2013 Share Posted May 4, 2013 No, I won't do it for you, is a really simple thing. Link to comment
maxleonardo3 Posted May 4, 2013 Author Share Posted May 4, 2013 I do not know to script in the script editor just know edit Link to comment
Castillo Posted May 4, 2013 Share Posted May 4, 2013 Well, then you better start learning, because in this section we help you with your scripting problems, we don't make things for you. Link to comment
maxleonardo3 Posted May 4, 2013 Author Share Posted May 4, 2013 Man I swear I do not know so please put the min line to foul so it does not even know why I swear. so for destroir the car when the player out of it, or create another unction VeiculoVIP() if not isElementInWater(source) then local x, y, z = getElementPosition (source) local carro = createVehicle ( 411, x, y, z ) warpPedIntoVehicle ( source, carro ) end end addEvent("VeiculoVIP", true) addEventHandler("VeiculoVIP", root, VeiculoVIP) 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