06.07.2011, 04:00
Ok so I am trying to round the vehicle health to 100.0%, 95.3% and so forth so I did this
but that will return 100.000000000000%
or 99.30000000000%
and so forth is there anyway to chop off the extra 0's as I did not see a float function that would do it.
Код:
new Float:vhealth; GetVehicleHealth(GetPlayerVehicleID(playerid), vhealth); vhealth = floatdiv(vhealth, 1000.0); vhealth = floatmul(vhealth, 1000); vhealth = floatround(vhealth); vhealth = floatdiv(vhealth, 10);
or 99.30000000000%
and so forth is there anyway to chop off the extra 0's as I did not see a float function that would do it.