GetVehicleHealth isn't returning the correct value
#1

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.

pawn Code:
SetVehicleHealth(vehicleid, 1000.5);
GetVehicleHealth(vehicleid, current_health);
if(current_health <= 1000.25)
{
    // Do something here.
}
else
{
    // Do something else here.
}
I printed current_health and it was not 1000.5 but something else (probably the old vehicle health).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)