06.02.2011, 21:57
If I use GetVehicleHealth just after SetVehicleHealth, it won't return the corrent value. I wanted to know if the health of the vehicle changed after I set it to more than 1000 but it doesn't return the value I just set.
I printed current_health and it was not 1000.5 but something else (probably the old vehicle health).
pawn Code:
SetVehicleHealth(vehicleid, 1000.5);
GetVehicleHealth(vehicleid, current_health);
if(current_health <= 1000.25)
{
// Do something here.
}
else
{
// Do something else here.
}