18.08.2012, 12:55
pawn Код:
new Timer_UP;
Timer_UP = SetTimer("GE", (11 * 60 * 1000), true);
forward GE();
public GE()
{
for(new i = (MAX_PLAYERS - 1); i > -1; --i)
{
if(IsPlayerConnected(i))
{
new s[36];
format(s, sizeof(s), "Contas/%s.ini", pNick(i));
if(Experiencia[i] >= 5)
{
pLevel[i]++;
Experiencia[i] = 0;
TLM[i] = 10;
SetPlayerScore(i, dini_Int(s, "Level"));
format(strc, sizeof(strc), "| LEVEL | Vocк ganhou +1 level! Level atual: %d", pLevel[i]);
SendClientMessage(i, CINFO, strc);
PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
dini_IntSet(s, "ExpJogador", Experiencia[i]);
dini_IntSet(s, "Level", pLevel[i]);
TeM(i);
}
else
{
Experiencia[i]++;
TLM[i] = 10;
format(strc, sizeof(strc), "| EXP | Vocк ganhou +1 ponto de experiencia. (%d/5)", Experiencia[i]);
SendClientMessage(i, CINFO, strc);
PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);
dini_IntSet(s, "ExpJogador", Experiencia[i]);
TeM(i);
}
}
}
return 1;
}