Why is this not working?
#1

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

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;
}
Reply


Messages In This Thread
Why is this not working? - by AnonScripter - 07.02.2014, 04:41
Re: Why is this not working? - by Shockey HD - 07.02.2014, 05:15
Re: Why is this not working? - by [ABK]Antonio - 07.02.2014, 05:26
Re: Why is this not working? - by ProjectMan - 07.02.2014, 05:40
Re: Why is this not working? - by Vince - 07.02.2014, 06:05
Re: Why is this not working? - by AnonScripter - 07.02.2014, 21:56
Re: Why is this not working? - by Threshold - 08.02.2014, 04:45
Re: Why is this not working? - by AnonScripter - 08.02.2014, 09:03

Forum Jump:


Users browsing this thread: 1 Guest(s)