27.04.2013, 18:53
I have this command here
on the health tab it displays as 1000 instead of 100 how would I round the number
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;
}