SA-MP Forums Archive
GameText to ProgressBar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GameText to ProgressBar (/showthread.php?tid=555963)



GameText to ProgressBar - weedxd - 09.01.2015

So yeah well i have these gametexts but i dunno how to turn them into progress bars can somone help ?

+REP ofcorse

EDIT: If you could add names to them it would be really grate (Purple bars + White texts

PHP код:
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
        {
            new 
string[64];
            
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~%s's Ping: ~w~%d"RPN(Specid[playerid]), GetPlayerPing(Specid[playerid]));
            
GameTextForPlayer(playeridstring,10003);
        }
if(
Speedo[playerid] && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new 
string[64], speed GetVehicleSpeed(GetPlayerVehicleID(playerid), 0);
            
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Speedometer: ~w~%d MPH"speed);
            
GameTextForPlayer(playeridstring,10003);
        }
if(
fMeter[playerid] && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new 
string[64];
            
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Fuel: ~w~%d%"Fuel[GetPlayerVehicleID(playerid)]);
            
GameTextForPlayer(playeridstring,10003);
        }