vehicle health rounding
#5

Well consider this vehicles catch fire when their HP reaches 250 then explode at 0.0, I would recommend doing this when calculating your vehicle health percentage....

health -= 250.0;
if(health <= 0.0) string = "Health: 0.00";
else format(string,sizeof(string),"Health: %0.2f",floatmul(floatdiv(health, 750.0), 100));
Reply


Messages In This Thread
vehicle health rounding - by horsemeat - 27.04.2013, 18:53
AW: vehicle health rounding - by HurtLocker - 27.04.2013, 19:25
Re: AW: vehicle health rounding - by horsemeat - 27.04.2013, 20:06
Re: vehicle health rounding - by Chenko - 27.04.2013, 20:26
Re: vehicle health rounding - by Pottus - 27.04.2013, 20:37

Forum Jump:


Users browsing this thread: 2 Guest(s)