27.04.2013, 20:37
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));
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));