Rat32 Posted March 6, 2015 Share Posted March 6, 2015 Whats. I have a script that when you press the button, we spawn a vehicle. But I have a hard problem. I want to do so that when you press it a second time that vehicle exhausts with "destroyElement". But unfortunately removes ALL players then these vehicles and do not know what to do. Please help, I greet . Link to comment
JR10 Posted March 6, 2015 Share Posted March 6, 2015 I'm not sure what's the problem, when you destroy a vehicle it's logical that the players will get removed. Perhaps I didn't understand. You should post the code so we can help you with it. Read this: viewtopic.php?f=91&t=47897 Link to comment
Gtagasje Posted March 6, 2015 Share Posted March 6, 2015 I think he means when 1 player spawns a new vehicle, all the old vehicles get deleted, instead of just the one of the player who spawned a second vehicle. If this is the case, you should make a table which keeps track of all the vehicles that have been spawned and link the player ID (thePlayer) with the vehicle in the table. This way you can later destroy only the vehicle of the player it was linked to. 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