Advertisement
Guest User

opencase

a guest
Feb 16th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.35 KB | None | 0 0
  1. function CaseOpeningTimer1(playerid) {
  2. CaseOpeningTimes[playerid] ++;
  3. if(CaseOpeningTimes[playerid] >= 1 && CaseOpeningTimes[playerid] <= 20) {
  4. switch(random(100)) {
  5. case 0..20: {
  6. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], -2147450625);
  7. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~p~mov");
  8. }
  9. case 21..40: {
  10. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], 8388863);
  11. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~g~verde");
  12. }
  13. case 41..60: {
  14. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], 65535);
  15. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~b~albastru");
  16. }
  17. case 61..80: {
  18. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], -65281);
  19. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~y~galben");
  20. }
  21. case 81..100: {
  22. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], -16776961);
  23. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~r~rosu");
  24. }
  25. }
  26. switch(random(100)) {
  27. case 0..20: {
  28. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], -2147450625);
  29. }
  30. case 21..40: {
  31. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], 8388863);
  32. }
  33. case 41..60: {
  34. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], 65535);
  35. }
  36. case 61..80: {
  37. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], -65281);
  38. }
  39. case 81..100: {
  40. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], -16776961);
  41. }
  42. }
  43. switch(random(100)) {
  44. case 0..20: {
  45. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], -2147450625);
  46. }
  47. case 21..40: {
  48. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], 8388863);
  49. }
  50. case 41..60: {
  51. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], 65535);
  52. }
  53. case 61..80: {
  54. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], -65281);
  55. }
  56. case 81..100: {
  57. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], -16776961);
  58. }
  59. }
  60. switch(random(100)) {
  61. case 0..20: {
  62. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], -2147450625);
  63. }
  64. case 21..40: {
  65. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], 8388863);
  66. }
  67. case 41..60: {
  68. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], 65535);
  69. }
  70. case 61..80: {
  71. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], -65281);
  72. }
  73. case 81..100: {
  74. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], -16776961);
  75. }
  76. }
  77. switch(random(100)) {
  78. case 0..20: {
  79. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], -2147450625);
  80. }
  81. case 21..40: {
  82. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], 8388863);
  83. }
  84. case 41..60: {
  85. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], 65535);
  86. }
  87. case 61..80: {
  88. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], -65281);
  89. }
  90. case 81..100: {
  91. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], -16776961);
  92. }
  93. }
  94. switch(random(100)) {
  95. case 0..20: {
  96. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], -2147450625);
  97. }
  98. case 21..40: {
  99. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], 8388863);
  100. }
  101. case 41..60: {
  102. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], 65535);
  103. }
  104. case 61..80: {
  105. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], -65281);
  106. }
  107. case 81..100: {
  108. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], -16776961);
  109. }
  110. }
  111. switch(random(100)) {
  112. case 0..20: {
  113. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], -2147450625);
  114. }
  115. case 21..40: {
  116. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], 8388863);
  117. }
  118. case 41..60: {
  119. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], 65535);
  120. }
  121. case 61..80: {
  122. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], -65281);
  123. }
  124. case 81..100: {
  125. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], -16776961);
  126. }
  127. }
  128. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][2]);
  129. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][3]);
  130. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][4]);
  131. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][5]);
  132. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][6]);
  133. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][7]);
  134. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][8]);
  135. }
  136. if(CaseOpeningTimes[playerid] == 20 || CaseOpeningTimes[playerid] == 21) {
  137. KillTimer(CaseOpeningRandTimer[playerid]);
  138. switch(random(100)) {
  139. case 71..90: {
  140. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], -2147450625);
  141. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~p~mov");
  142. SCM(playerid, COLOR_YELLOW, "Ai castigat o culoare hidden.");
  143. //PlayerInfo[playerid][pHiddenColor] ++;
  144.  
  145. format(GlobalString, sizeof GlobalString, "(( %s a castigat o culoare hidden [OpenCase]. ))", GetName(playerid));
  146. SendClientMessageToAll(COLOR_WHITE, GlobalString);
  147.  
  148. ShowCaseOpeningTD(playerid);
  149. }
  150. case 91..97: {
  151. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], 65535);
  152. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~b~albastru");
  153. new rand = random(50) + 10;
  154. SCMf(playerid, COLOR_YELLOW, "Ai castigat %d puncte premium.", rand);
  155. PlayerInfo[playerid][pPremiumPoints] += rand;
  156.  
  157. format(GlobalString, sizeof GlobalString, "(( %s a castigat %d puncte premium [OpenCase]. ))", GetName(playerid), rand);
  158. SendClientMessageToAll(COLOR_WHITE, GlobalString);
  159. ShowCaseOpeningTD(playerid);
  160. }
  161. case 36..70: {
  162. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], -65281);
  163. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~y~galben");
  164. new rand = random(100000) + 5000;
  165. SCMf(playerid, COLOR_YELLOW, "Ai castigat %s materiale.", FormatNumber(rand));
  166. PlayerInfo[playerid][pMats] += rand;
  167. ShowCaseOpeningTD(playerid);
  168. }
  169. case 0..35: {
  170. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][5], -16776961);
  171. PlayerTextDrawSetString(playerid, CaseOpeningTD[playerid][10], "~r~rosu");
  172. new rand = random(2000000) + 100000;
  173. SCMf(playerid, COLOR_YELLOW, "Ai castigat %s$.", FormatNumber(rand));
  174. Cash[playerid] += rand;
  175. ShowCaseOpeningTD(playerid);
  176. }
  177. }
  178. switch(random(100)) {
  179. case 0..20: {
  180. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], -2147450625);
  181. ShowCaseOpeningTD(playerid);
  182. }
  183. case 21..40: {
  184. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], 8388863);
  185. ShowCaseOpeningTD(playerid);
  186. }
  187. case 41..60: {
  188. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], 65535);
  189. ShowCaseOpeningTD(playerid);
  190. }
  191. case 61..80: {
  192. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], -65281);
  193. ShowCaseOpeningTD(playerid);
  194. }
  195. case 81..100: {
  196. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][2], -16776961);
  197. ShowCaseOpeningTD(playerid);
  198. }
  199. }
  200. switch(random(100)) {
  201. case 0..20: {
  202. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], -2147450625);
  203. ShowCaseOpeningTD(playerid);
  204. }
  205. case 21..40: {
  206. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], 8388863);
  207. ShowCaseOpeningTD(playerid);
  208. }
  209. case 41..60: {
  210. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], 65535);
  211. ShowCaseOpeningTD(playerid);
  212. }
  213. case 61..80: {
  214. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], -65281);
  215. ShowCaseOpeningTD(playerid);
  216. }
  217. case 81..100: {
  218. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][3], -16776961);
  219. ShowCaseOpeningTD(playerid);
  220. }
  221. }
  222. switch(random(100)) {
  223. case 0..20: {
  224. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], -2147450625);
  225. ShowCaseOpeningTD(playerid);
  226. }
  227. case 21..40: {
  228. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], 8388863);
  229. ShowCaseOpeningTD(playerid);
  230. }
  231. case 41..60: {
  232. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], 65535);
  233. ShowCaseOpeningTD(playerid);
  234. }
  235. case 61..80: {
  236. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], -65281);
  237. ShowCaseOpeningTD(playerid);
  238. }
  239. case 81..100: {
  240. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][4], -16776961);
  241. ShowCaseOpeningTD(playerid);
  242. }
  243. }
  244. switch(random(100)) {
  245. case 0..20: {
  246. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], -2147450625);
  247. ShowCaseOpeningTD(playerid);
  248. }
  249. case 21..40: {
  250. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], 8388863);
  251. ShowCaseOpeningTD(playerid);
  252. }
  253. case 41..60: {
  254. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], 65535);
  255. ShowCaseOpeningTD(playerid);
  256. }
  257. case 61..80: {
  258. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], -65281);
  259. ShowCaseOpeningTD(playerid);
  260. }
  261. case 81..100: {
  262. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][6], -16776961);
  263. ShowCaseOpeningTD(playerid);
  264. }
  265. }
  266. switch(random(100)) {
  267. case 0..20: {
  268. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], -2147450625);
  269. ShowCaseOpeningTD(playerid);
  270. }
  271. case 21..40: {
  272. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], 8388863);
  273. ShowCaseOpeningTD(playerid);
  274. }
  275. case 41..60: {
  276. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], 65535);
  277. ShowCaseOpeningTD(playerid);
  278. }
  279. case 61..80: {
  280. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], -65281);
  281. ShowCaseOpeningTD(playerid);
  282. }
  283. case 81..100: {
  284. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][7], -16776961);
  285. ShowCaseOpeningTD(playerid);
  286. }
  287. }
  288. switch(random(100)) {
  289. case 0..20: {
  290. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], -2147450625);
  291. ShowCaseOpeningTD(playerid);
  292. }
  293. case 21..40: {
  294. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], 8388863);
  295. ShowCaseOpeningTD(playerid);
  296. }
  297. case 41..60: {
  298. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], 65535);
  299. ShowCaseOpeningTD(playerid);
  300. }
  301. case 61..80: {
  302. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], -65281);
  303. ShowCaseOpeningTD(playerid);
  304. }
  305. case 81..100: {
  306. PlayerTextDrawBoxColor(playerid, CaseOpeningTD[playerid][8], -16776961);
  307. ShowCaseOpeningTD(playerid);
  308. }
  309. }
  310. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][2]);
  311. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][3]);
  312. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][4]);
  313. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][5]);
  314. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][6]);
  315. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][7]);
  316. PlayerTextDrawShow(playerid, CaseOpeningTD[playerid][8]);
  317. ShowCaseOpeningTD(playerid);
  318. Update(playerid, pCashx);
  319. Update(playerid, pMatsx);
  320. Update(playerid, pPremiumPointsx);
  321. Update(playerid, pCasex);
  322. Update(playerid, pCaseKeyx);
  323. //Update(playerid, pHiddenColorx);
  324. }
  325. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement