07.02.2014, 04:41
i made a fuel system and it works great, if i make the fuel string show as floating point number (%f)
this shows the fuel as "100.0" ....when i make the string as integer (%i) it shows the fuel in the game as a big number, what the heck is causing this ? (2349992347)
how to make the fuel show as "100" without point
this shows the fuel as "100.0" ....when i make the string as integer (%i) it shows the fuel in the game as a big number, what the heck is causing this ? (2349992347)
how to make the fuel show as "100" without point
pawn Код:
public OnGameModeInit()
{
for(new Vehicles = 0; Vehicles < MAX_VEHICLES; Vehicles++)
{
Fuel[Vehicles] = random(100);
}
return 1;
}
forward Speedometer();
public Speedometer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
{
format(string,sizeof(string),"~w~Fuel: %i", Fuel[GetPlayerVehicleID(i)])
}
}
return 1;
}