Per-player vehicles - Id's get mixed up (Car stealing problem)
#5

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
I don't think you have understood what "CreateVehicle" returns, there is no single way a vehicle created with "CreateVehicle" could have somehow the same id. If someone's vehicle is destroyed and their vehicle respawned, then just refresh the player's variable containing the id to the new vehicle's id. They will never be the same.
A dead vehicle is still using the slot of that vehicle id -
And I know that CreateVehicle isn't going to return a used ID, so I need to prevent destroying the old car, in case it is used by someone else.

But why would a car, that someone spawned; suddenly have another owner? Just, w00t?
That is my problem.

Player 0 spawns a car, and have it saved in his "spawnedcarid".
Player 1 Spawns his car, destroys id 0's car, and creates id 0's "spawnedcarid". (Aka; car is stolen)

I can do it the way you say, but wasn't exactly what i was thinking in first place.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)