WhoAmI Posted February 28, 2015 Posted February 28, 2015 Alloha, Is that any way to respawn vehicle which is spawned only from .map files? Not exactly one file, but whole in the server.
WhoAmI Posted March 1, 2015 Author Posted March 1, 2015 Well, but it does return all elements, even those not spawned from .map file.
Solstice. Posted March 1, 2015 Posted March 1, 2015 for _, cars in ipairs( getElementsByType( "vehicle" ) ) do if getElementData( cars, "mapeditor" ) == 1 then respawnVehicle( cars ) end end Add elementdata in the spawn function for normal vehicles to distinguish.
WhoAmI Posted March 1, 2015 Author Posted March 1, 2015 Don't get you. How can I set element data to vehicles spawned from .map file?
Scripting Moderators Sarrum Posted March 1, 2015 Scripting Moderators Posted March 1, 2015 for _, v in ipairs ( getElementsByType ( "vehicle" ) ) do if getElementID ( v ):find ( "vehicle" ) then respawnVehicle ( v ) end end ?
WhoAmI Posted March 1, 2015 Author Posted March 1, 2015 That is what I have been looking for. Thanks.
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