1LoL1 Posted April 16, 2014 Posted April 16, 2014 It could not be done in this script so that it could be gone from the server only cars that have already exploded? or are in the water ..? please help function allvehiclesaredoomed() vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do destroyElement(v) end end addCommandHandler("destroyall", allvehiclesaredoomed)
Castillo Posted April 16, 2014 Posted April 16, 2014 You must use isVehicleBlown and isElementInWater. function allvehiclesaredoomed ( ) local vehicles = getElementsByType ( "vehicle" ) for _, v in ipairs ( vehicles ) do if ( isVehicleBlown ( v ) or isElementInWater ( v ) ) then destroyElement ( v ) end end end addCommandHandler ( "destroyall", allvehiclesaredoomed ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
1LoL1 Posted April 17, 2014 Author Posted April 17, 2014 You must use isVehicleBlown and isElementInWater. function allvehiclesaredoomed ( ) local vehicles = getElementsByType ( "vehicle" ) for _, v in ipairs ( vehicles ) do if ( isVehicleBlown ( v ) or isElementInWater ( v ) ) then destroyElement ( v ) end end end addCommandHandler ( "destroyall", allvehiclesaredoomed ) Thanks.
Castillo Posted April 17, 2014 Posted April 17, 2014 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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