View difference between Paste ID: nzUdc5Hv and JWexxiSA
SHOW: | | - or go back to the newest paste.
1
enum pInfo
2
{
3
	pXP,
4
	pNivel
5
};
6
new Player[MAX_PLAYERS][pInfo];
7
8
public OnGameModeInit()
9
{
10
	SetTimer("PayDay", 10000, true);
11
	return 1;
12
}
13
14
forward PayDay();
15
public PayDay()
16
{
17
	for(new i = 0; i < MAX_PLAYERS; i++)
18
	{
19
	    if(Player[i][pLogado] == 0) return 1;
20
	    Player[i][pXP] += 1;
21
	    GivePlayerMoney(i, 500);
22
	    SendClientMessage(i, -1, "-=-=-=-=-=-= PAYDAY -=-=-=-=-=-");
23
	    new str[160];
24
	    format(str, 160, "XP : %d/4", Player[i][pXP]);
25
	    SendClientMessage(i, -1, str);
26
	    if(Player[i][pXP] >= 4)
27
	    {
28
	        Player[i][pNivel] += 1;
29
	        Player[i][pXP] = 0;
30
	        SendClientMessage(i, -1, "Parabens, voce subiu de nivel");
31
	        format(str, 160, "Nivel : %d", Player[i][pNivel]);
32
	        SendClientMessage(i, -1, str);
33
	    }
34
	    else
35
	    {
36
     		format(str, 160, "Nivel : %d", Player[i][pNivel]);
37
	        SendClientMessage(i, -1, str);
38
	    }
39
	
40
	}
41
	return 1;
42
}