Guest User

Untitled

a guest
Aug 12th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. public ExpTimer()
  2. {
  3. for(new i = 0; i < MAX_PLAYERS; i++)
  4. {
  5. if(IsPlayerConnected(i))
  6. {
  7. if (gPlayerLogged[i] != 0)
  8. {
  9. if(PlayerInfo[i][pLevel] >= 0)
  10. {
  11. new nxtlevel = PlayerInfo[i][pLevel]+1;
  12. new expamount = nxtlevel*levelexp;
  13. new string[128];
  14. if (PlayerInfo[i][pExp] < expamount)
  15. {
  16. return 1;
  17. }
  18. else
  19. {
  20. format(string, sizeof(string), "~r~POKACIVTE LEVEL !");
  21. GameTextForPlayer(i, string, 5000, 4);
  22. PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
  23. format(string, sizeof(string), "Pocekajte...",PlayerInfo[i][pExp],expamount);
  24. TextDrawSetString(lvlexp[i], string);
  25. PlayerInfo[i][pLevel]++;
  26. PlayerInfo[i][pExp] = 0;
  27. if(PlayerInfo[i][pDonateRank] > 0)
  28. {
  29. PlayerInfo[i][pExp] -= expamount;
  30. new total = PlayerInfo[i][pExp];
  31. if(total > 0)
  32. {
  33. PlayerInfo[i][pExp] = total;
  34. }
  35. else
  36. {
  37. PlayerInfo[i][pExp] = 0;
  38. }
  39. }
  40. else
  41. {
  42. PlayerInfo[i][pExp] = 0;
  43. }
  44. }
  45. }
  46. return 1;
  47. }
  48. else
  49. {
  50. }
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment