AddStaticVehicleEx ID's problem
#1

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:

pawn Код:
new TaxiCar;

OnGameModeInit
{
    TaxiCar = AddStaticVehicleEx(taxi car info and spawn info...");
}
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.
Reply


Messages In This Thread
AddStaticVehicleEx ID's problem - by Makaveli93 - 28.06.2012, 14:20
Re: AddStaticVehicleEx ID's problem - by RedWingz - 28.06.2012, 14:57

Forum Jump:


Users browsing this thread: 2 Guest(s)