25.04.2012, 03:40
follow the example
is now with you.
pawn Код:
new Bar:barid[MAX_PLAYERS];
new Value[MAX_PLAYERS];
public OnPlayerConnect(playerid) {
barid[playerid] = //CreateProgressBar ( .. ) ;
ShowProgressBarForPlayer(playerid, barid[playerid]) ;
SetProgressBarValue(barid[playerid], Value[playerid]) ;
SetProgressBarMaxValue(barid[playerid], 10000);
SetTimerEx("UpdateBar", 5000, true, "i", playerid) ;
return true ;
}
//when you gain experience
Value[playerid] ++;
forward UpdateBar(playerid);
public UpdateBar(playerid) {
SetProgressBarValue(barid[playerid], Value[playerid]) ;
UpdateProgressBar(barid[playerid], playerid);
return true;
}