Rei_Ayanami

Payday Lvl UP

Jul 29th, 2023
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
Add Comment
Please, Sign In to add comment