25.01.2011, 15:37
pawn Код:
//Arriba
forward EXPTimer(playerid);
//En OnGameModeInit
SetTimer("EXPTimer",500,1);
//Abajo del todo del GM
public EXPTimer(playerid)
{
new score = GetPlayerMoney(playerid);
if(score >= 1 || score == 10)
{
SetProgressBarValue(exp[playerid],score*10);
UpdateProgressBar(exp[playerid],playerid);
}
if(score == 12)
{
SetProgressBarValue(exp[playerid],0);
UpdateProgressBar(exp[playerid],playerid);
NumNivelVar[playerid] ++;
format(string1, sizeof (string1), "Nivel: %i", NumNivelVar[playerid]);
TextDrawDestroy(NumNivel);
TextDrawSetString(Nivel, string1);
TextDrawShowForPlayer(playerid, Nivel);
return 1;
}
return 1;
}