28.06.2012, 14:20
For some reason, when a vehicle is destroyed and then re-spawned, or just re-spawned, the vehicle ids tend to mix up and variables that store those IDs now have a different ID. For example:
Now, I have a check on OnPlayerStateChage, for player entering a taxi car as a passenger, which starts the timer for taxi ride cost. After the car is re-spawned by GTA or destroyed and then re-spawned, TaxiCar variable gets a different ID and the original taxi car has also a different ID. This happens with police and other vehicles, such as private, faction or admin vehicles. Is there a way to fix this somehow? I don't set/reset any variables on OnVehicleDeath or on OnVehicleSpawn, it's basically empty.
pawn Код:
new TaxiCar;
OnGameModeInit
{
TaxiCar = AddStaticVehicleEx(taxi car info and spawn info...");
}