Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum pInfo
- {
- pXP,
- pNivel
- };
- new Player[MAX_PLAYERS][pInfo];
- public OnGameModeInit()
- {
- SetTimer("PayDay", 10000, true);
- return 1;
- }
- forward PayDay();
- public PayDay()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(Player[i][pLogado] == 0) return 1;
- Player[i][pXP] += 1;
- GivePlayerMoney(i, 500);
- SendClientMessage(i, -1, "-=-=-=-=-=-= PAYDAY -=-=-=-=-=-");
- new str[160];
- format(str, 160, "XP : %d/4", Player[i][pXP]);
- SendClientMessage(i, -1, str);
- if(Player[i][pXP] >= 4)
- {
- Player[i][pNivel] += 1;
- Player[i][pXP] = 0;
- SendClientMessage(i, -1, "Parabens, voce subiu de nivel");
- format(str, 160, "Nivel : %d", Player[i][pNivel]);
- SendClientMessage(i, -1, str);
- }
- else
- {
- format(str, 160, "Nivel : %d", Player[i][pNivel]);
- SendClientMessage(i, -1, str);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement