Vehicle IDs
#1

Vehicle IDs are set when the vehicle is spawned, but what are the things that cause the vehicle id to change other than respawning it?is there any other case where the vehicle id gets changed?
Reply
#2

Vehicle id's are assigned when the vehicle is created and never changes as long as it exists.
Even when a vehicle gets destroyed (explodes or driven into water) and it respawns, the id remains the same.

It becomes invalid when you use DestroyVehicle to delete the vehicle from the server and the id will be re-used when it's the first id available when you create a new vehicle.

If the id would change during the existance of a vehicle, the id would mean nothing and you would be unable to control your vehicles properly.
Reply
#3

Thank you, another question, since vehicles are set to respawn automatically after dying, how do I prevent it?only by putting a code under onvehiclespawn or ovehicledeath? and how can I change where it spawns automatically?
Reply
#4

Quote:
Originally Posted by iBots
Посмотреть сообщение
Thank you, another question, since vehicles are set to respawn automatically after dying, how do I prevent it?only by putting a code under onvehiclespawn or ovehicledeath? and how can I change where it spawns automatically?
OnVehicleDeath should be fine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)