vehicle health rounding
#1

I have this command here

pawn Код:
public Gage()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInAnyVehicle(i))
            {
                new Float:health,Float:speedx,Float:speedy,Float:speedz,vehicleid = GetPlayerVehicleID(i),Float:editspeed,finalspeed,string[256];
                GetVehicleVelocity(vehicleid,speedx,speedy,speedz);
                editspeed = floatsqroot(((speedx*speedx)+(speedy*speedy))+(speedz*speedz))*136.666667;
                finalspeed = floatround(editspeed,floatround_round);
                format(string,sizeof(string),"Speed: %i",finalspeed);
                TextDrawSetString(Textdraw0[i],string);
                GetVehicleHealth(vehicleid,health);
                format(string,sizeof(string),"Health: %i",floatround(health));
                TextDrawSetString(Textdraw1[i],string);
                format(string,sizeof(string),"Fuel: %i",fuel[vehicleid]);
                TextDrawSetString(Textdraw2[i],string);
            }
        }
    }
    return 1;
}
on the health tab it displays as 1000 instead of 100 how would I round the number
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: 5 Guest(s)