02.09.2016, 23:26
Quote:
First, how do you that the vehicle wasn't already destroyed? Do you track destroyed vehicles in OnVehicleDeath? Do you clear the CarID?
Second, is it possible to have multiple cars with the same id? If not, you should break your for loop when it finds the car id. Now to assist you, You're using Код:
DestroyVehicle(id); One final note: Код:
GetVehicleHealth(id, health); DestroyVehicle(id); etc... |
That's why i'm using this:
Код:
if(VehicleSystem[i][CarID] == id)
When I delete a car, I save on MySQL the Health, the Fuel, etc. Also the Stats (0 is spawned, 1 is saved/not spawned/destroyed). When I change the Stats to Respawn, it respawns but in another ingame id because there are newest cars. I can find the car using the MySQL ID I gave to the vehicle, but I cannot respawn a car in a used id because the old vars are there.
What I can do when I save the State of the car?