WhoAmI Posted February 28, 2015 Share 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. Link to comment
WhoAmI Posted March 1, 2015 Author Share Posted March 1, 2015 Well, but it does return all elements, even those not spawned from .map file. Link to comment
Solstice. Posted March 1, 2015 Share 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. Link to comment
WhoAmI Posted March 1, 2015 Author Share Posted March 1, 2015 Don't get you. How can I set element data to vehicles spawned from .map file? Link to comment
Scripting Moderators Sarrum Posted March 1, 2015 Scripting Moderators Share Posted March 1, 2015 for _, v in ipairs ( getElementsByType ( "vehicle" ) ) do if getElementID ( v ):find ( "vehicle" ) then respawnVehicle ( v ) end end ? Link to comment
WhoAmI Posted March 1, 2015 Author Share Posted March 1, 2015 That is what I have been looking for. Thanks. 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