Advertisement
Guest User

Untitled

a guest
Feb 8th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. task playerlndCrateTimer[500]()
  2. {
  3. foreach(new x : playerInCrate)
  4. {
  5. if(lndCrateTimer[x])
  6. {
  7. lndCrateTimer[x] --;
  8. new amount, playerid;
  9. if(lndCrateType[x] == 1) amount = random(50);
  10. else amount = random(80);
  11. switch(amount)
  12. {
  13. case 0..20:
  14. {
  15. PlayerTextDrawSetString(x, lndCrates[3], "$20.000.000");
  16. if(!lndCrateTimer[x])
  17. {
  18. SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat $20.000.000");
  19. defer hidePlayerCrates(x);
  20. GivePlayerCash(playerid, 20000000);
  21. Update(playerid, pCashx);
  22. }
  23. }
  24. case 21..25:
  25. {
  26. PlayerTextDrawSetString(x, lndCrates[3], "10 Premium Points");
  27. if(!lndCrateTimer[x])
  28. {
  29. SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 10 Premium Points.");
  30. defer hidePlayerCrates(x);
  31. PlayerInfo[playerid][pPremiumPoints] += 10;
  32. Update(playerid, pPremiumPointsx);
  33. }
  34. }
  35. case 26..30:
  36. {
  37. PlayerTextDrawSetString(x, lndCrates[3], "10.000 materials");
  38. if(!lndCrateTimer[x])
  39. {
  40. SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 10.000 materials.");
  41. defer hidePlayerCrates(x);
  42. PlayerInfo[playerid][pMats] += 10000;
  43. Update(playerid, pMatsx);
  44. }
  45. }
  46. case 31..45:
  47. {
  48. PlayerTextDrawSetString(x, lndCrates[3], "10 Rob Points");
  49. if(!lndCrateTimer[x])
  50. {
  51. SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 10 Rob Points.");
  52. defer hidePlayerCrates(x);
  53. PlayerInfo[playerid][pRob] += 10;
  54. Update(playerid, pRobx);
  55. }
  56. }
  57. case 46..60:
  58. {
  59. PlayerTextDrawSetString(x, lndCrates[3], "1 Hidden Color");
  60. if(!lndCrateTimer[x])
  61. {
  62. SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 1 Hidden Color.");
  63. defer hidePlayerCrates(x);
  64. PlayerInfo[playerid][pHiddenColor] += 1;
  65. Update(playerid, pHiddenColorx);
  66. }
  67. }
  68. case 61..80:
  69. {
  70. PlayerTextDrawSetString(x, lndCrates[3], "5 Respect Points");
  71. if(!lndCrateTimer[x])
  72. {
  73. SCM(x, COLOR_ORANGE, "Normal Crate: Ai castigat 5 Respect Points.");
  74. defer hidePlayerCrates(x);
  75. PlayerInfo[playerid][pExp] += 5;
  76. Update(playerid, pRP);
  77. }
  78. }
  79. }
  80. if(lndCrateType[x] == 2) amount = random(50);
  81. else amount = random(170);
  82. switch(amount)
  83. {
  84. case 90..110:
  85. {
  86. PlayerTextDrawSetString(x, lndCrates[3], "$40.000.000");
  87. if(!lndCrateTimer[x])
  88. {
  89. SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat $40.000.000");
  90. defer hidePlayerCrates(x);
  91. GivePlayerCash(playerid, 40000000);
  92. Update(playerid, pCashx);
  93. }
  94. }
  95. case 111..125:
  96. {
  97. PlayerTextDrawSetString(x, lndCrates[3], "30 Premium Points");
  98. if(!lndCrateTimer[x])
  99. {
  100. SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 30 Premium Points.");
  101. defer hidePlayerCrates(x);
  102. PlayerInfo[playerid][pPremiumPoints] += 30;
  103. Update(playerid, pPremiumPointsx);
  104. }
  105. }
  106. case 126..139:
  107. {
  108. PlayerTextDrawSetString(x, lndCrates[3], "20.000 materials");
  109. if(!lndCrateTimer[x])
  110. {
  111. SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 20.000 materials.");
  112. defer hidePlayerCrates(x);
  113. PlayerInfo[playerid][pMats] += 20000;
  114. Update(playerid, pMatsx);
  115. }
  116. }
  117. case 140..148:
  118. {
  119. PlayerTextDrawSetString(x, lndCrates[3], "20 Rob Points");
  120. if(!lndCrateTimer[x])
  121. {
  122. SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 20 Rob Points.");
  123. defer hidePlayerCrates(x);
  124. PlayerInfo[playerid][pRob] += 20;
  125. Update(playerid, pRobx);
  126. }
  127. }
  128. case 149..155:
  129. {
  130. PlayerTextDrawSetString(x, lndCrates[3], "2 Hidden Colors");
  131. if(!lndCrateTimer[x])
  132. {
  133. SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 2 Hidden Colors.");
  134. defer hidePlayerCrates(x);
  135. PlayerInfo[playerid][pHiddenColor] += 2;
  136. Update(playerid, pHiddenColorx);
  137. }
  138. }
  139. case 156..171:
  140. {
  141. PlayerTextDrawSetString(x, lndCrates[3], "10 Respect Points");
  142. if(!lndCrateTimer[x])
  143. {
  144. SCM(x, COLOR_ORANGE, "Special Crate: Ai castigat 10 Respect Points.");
  145. defer hidePlayerCrates(x);
  146. PlayerInfo[playerid][pExp] += 10;
  147. Update(playerid, pRP);
  148. }
  149. }
  150. }
  151. }
  152. }
  153. return 1;
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement