Guest User

Untitled

a guest
Nov 1st, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.00 KB | None | 0 0
  1. forward CaseOpen(playerid);
  2. public CaseOpen(playerid)
  3. {
  4. new rand = random(100),string[256],strings[128],strz[64];
  5. if(rand == 1)
  6. {
  7. if(CaseCount[playerid] == 0)
  8. {
  9. if(PlayerInfo[playerid][pPremiumAccount] != 2) {
  10. PlayerInfo[playerid][pPremiumAccount] = 2;
  11. Update(playerid, pPremiumAccountx);
  12. format(strings,sizeof strings,"* You win a vip account.");
  13. SendClientMessage(playerid,COLOR_YELLOW,strings);
  14. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1277); //disket vip account
  15. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  16. format(strz, sizeof(strz), "vip account");
  17. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  18. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  19. }
  20. else
  21. { //1 - red | 2 - green | 3 - yellow | 4- pink | 5- blue
  22. new randneon = 1 + random(5),neontext[16],neon;
  23. if(randneon == 1)
  24. {
  25. neon = 18647;
  26. format(neontext,sizeof(neontext), "red");
  27. PlayerInfo[playerid][pNeonR]++;
  28. Update(playerid, pNeonRx);
  29. }
  30. else if(randneon == 2)
  31. {
  32. neon = 18649;
  33. format(neontext,sizeof(neontext), "green");
  34. PlayerInfo[playerid][pNeonV]++;
  35. Update(playerid, pNeonVx);
  36. }
  37. else if(randneon == 3)
  38. {
  39. neon = 18650;
  40. format(neontext,sizeof(neontext), "yellow");
  41. PlayerInfo[playerid][pNeonG]++;
  42. Update(playerid, pNeonGx);
  43. }
  44. else if(randneon == 4)
  45. {
  46. neon = 18651;
  47. format(neontext,sizeof(neontext), "pink");
  48. PlayerInfo[playerid][pNeonRZ]++;
  49. Update(playerid, pNeonRZx);
  50. }
  51. else if(randneon == 5)
  52. {
  53. neon = 18648;
  54. format(neontext,sizeof(neontext), "blue");
  55. PlayerInfo[playerid][pNeonA]++;
  56. Update(playerid, pNeonAx);
  57. }
  58. format(strings,sizeof strings,"* You win a %s neon (/myneons).",neontext);
  59. SendClientMessage(playerid,COLOR_YELLOW,strings);
  60. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], neon);
  61. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  62. format(strz, sizeof(strz), "%s neon",neontext);
  63. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  64. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  65. }
  66. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  67. mysql_tquery(SQL,string,"","");
  68. }
  69. else {
  70. if(PlayerInfo[playerid][pPremiumAccount] != 2) {
  71. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1277); //disket vip account
  72. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  73. format(strz, sizeof(strz), "vip account");
  74. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  75. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  76. }
  77. else
  78. {
  79. //1 - red | 2 - green | 3 - yellow | 4- pink | 5- blue
  80. new randneon = 1 + random(5),neontext[16],neon;
  81. if(randneon == 1)
  82. {
  83. neon = 18647;
  84. format(neontext,sizeof(neontext), "red");
  85. }
  86. else if(randneon == 2)
  87. {
  88. neon = 18649;
  89. format(neontext,sizeof(neontext), "green");
  90. }
  91. else if(randneon == 3)
  92. {
  93. neon = 18650;
  94. format(neontext,sizeof(neontext), "yellow");
  95. }
  96. else if(randneon == 4)
  97. {
  98. neon = 18651;
  99. format(neontext,sizeof(neontext), "pink");
  100. }
  101. else if(randneon == 5)
  102. {
  103. neon = 18648;
  104. format(neontext,sizeof(neontext), "blue");
  105. }
  106. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], neon);
  107. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  108. format(strz, sizeof(strz), "%s neon",neontext);
  109. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  110. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  111. }
  112. }
  113. }
  114. else if(rand == 0)
  115. {
  116. if(CaseCount[playerid] == 0)
  117. {
  118. if(PlayerInfo[playerid][pPremiumAccount] == 0) {
  119. PlayerInfo[playerid][pPremiumAccount] = 1;
  120. Update(playerid, pPremiumAccountx);
  121. format(strings,sizeof strings,"* You win a premium account.");
  122. SendClientMessage(playerid,COLOR_YELLOW,strings);
  123. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1277); //disket premium account
  124. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  125. format(strz, sizeof(strz), "premium account");
  126. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  127. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  128. }
  129. else
  130. {
  131. //1 - red | 2 - green | 3 - yellow | 4- pink | 5- blue
  132. new randneon = 1 + random(5),neontext[16],neon;
  133. if(randneon == 1)
  134. {
  135. neon = 18647;
  136. format(neontext,sizeof(neontext), "red");
  137. PlayerInfo[playerid][pNeonR]++;
  138. Update(playerid, pNeonRx);
  139. }
  140. else if(randneon == 2)
  141. {
  142. neon = 18649;
  143. format(neontext,sizeof(neontext), "green");
  144. PlayerInfo[playerid][pNeonV]++;
  145. Update(playerid, pNeonVx);
  146. }
  147. else if(randneon == 3)
  148. {
  149. neon = 18650;
  150. format(neontext,sizeof(neontext), "yellow");
  151. PlayerInfo[playerid][pNeonG]++;
  152. Update(playerid, pNeonGx);
  153. }
  154. else if(randneon == 4)
  155. {
  156. neon = 18651;
  157. format(neontext,sizeof(neontext), "pink");
  158. PlayerInfo[playerid][pNeonRZ]++;
  159. Update(playerid, pNeonRZx);
  160. }
  161. else if(randneon == 5)
  162. {
  163. neon = 18648;
  164. format(neontext,sizeof(neontext), "blue");
  165. PlayerInfo[playerid][pNeonA]++;
  166. Update(playerid, pNeonAx);
  167. }
  168. format(strings,sizeof strings,"* You win a %s neon (/myneons).",neontext);
  169. SendClientMessage(playerid,COLOR_YELLOW,strings);
  170. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], neon);
  171. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  172. format(strz, sizeof(strz), "%s neon",neontext);
  173. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  174. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  175. }
  176. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  177. mysql_tquery(SQL,string,"","");
  178. }
  179. else
  180. {
  181. if(PlayerInfo[playerid][pPremiumAccount] == 0) {
  182. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1277); //disket vip account
  183. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  184. format(strz, sizeof(strz), "premium account");
  185. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  186. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  187. }
  188. else
  189. {
  190. //1 - red | 2 - green | 3 - yellow | 4- pink | 5- blue
  191. new randneon = 1 + random(5),neontext[16],neon;
  192. if(randneon == 1)
  193. {
  194. neon = 18647;
  195. format(neontext,sizeof(neontext), "red");
  196. }
  197. else if(randneon == 2)
  198. {
  199. neon = 18649;
  200. format(neontext,sizeof(neontext), "green");
  201. }
  202. else if(randneon == 3)
  203. {
  204. neon = 18650;
  205. format(neontext,sizeof(neontext), "yellow");
  206. }
  207. else if(randneon == 4)
  208. {
  209. neon = 18651;
  210. format(neontext,sizeof(neontext), "pink");
  211. }
  212. else if(randneon == 5)
  213. {
  214. neon = 18648;
  215. format(neontext,sizeof(neontext), "blue");
  216. }
  217. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], neon);
  218. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  219. format(strz, sizeof(strz), "%s neon",neontext);
  220. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  221. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  222. }
  223. }
  224. }
  225. else if(rand >= 2 && rand <= 7)
  226. {
  227. if(CaseCount[playerid] == 0)
  228. {
  229. PlayerInfo[playerid][pLevel]++;
  230. Update(playerid, pLevelx);
  231. SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
  232. format(strings,sizeof strings,"* You win a level up.");
  233. SendClientMessage(playerid,COLOR_YELLOW,strings);
  234. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  235. mysql_tquery(SQL,string,"","");
  236. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1851); //levelup
  237. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  238. format(strz, sizeof(strz), "level up");
  239. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  240. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  241. }
  242. else
  243. {
  244. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1851); //levelup
  245. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  246. format(strz, sizeof(strz), "level up");
  247. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  248. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  249. }
  250. }
  251. else if(rand >= 8 && rand <= 13)
  252. {
  253. if(CaseCount[playerid] == 0)
  254. {
  255. PlayerInfo[playerid][pPremiumPoints] += 20;
  256. Update(playerid, pPremiumPointsx);
  257. format(strings,sizeof strings,"* You win 20 premium points.");
  258. SendClientMessage(playerid,COLOR_YELLOW,strings);
  259. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  260. mysql_tquery(SQL,string,"","");
  261. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1882); //premiumpoints
  262. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  263. format(strz, sizeof(strz), "20 premium points");
  264. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  265. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  266. }
  267. else
  268. {
  269. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1882); //premiumpoints
  270. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  271. format(strz, sizeof(strz), "20 premium points");
  272. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  273. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  274. }
  275. }
  276. else if(rand >= 14 && rand <= 25)
  277. {
  278. if(CaseCount[playerid] == 0)
  279. {
  280. if(PlayerInfo[playerid][pTSkins] < 311)
  281. {
  282. new randskin = random(312);
  283. while(verifySkin(playerid, randskin) == 1 || randskin == 74) randskin = random(312);
  284. addSkin(playerid, randskin);
  285. format(strings,sizeof strings,"* You win skin %d.",randskin);
  286. SendClientMessage(playerid,COLOR_YELLOW,strings);
  287. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], randskin); //skin
  288. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  289. format(strz, sizeof(strz), "skin %d",randskin);
  290. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  291. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  292. }
  293. else
  294. {
  295. GivePlayerCash(playerid,800000);
  296. format(strings,sizeof strings,"* You win 800,000$.");
  297. SendClientMessage(playerid,COLOR_YELLOW,strings);
  298. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  299. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  300. format(strz, sizeof(strz), "800.000$");
  301. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  302. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  303. }
  304. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  305. mysql_tquery(SQL,string,"","");
  306. }
  307. else
  308. {
  309. if(PlayerInfo[playerid][pTSkins] < 311)
  310. {
  311. new randskin = random(312);
  312. while(verifySkin(playerid, randskin) == 1 || randskin == 74) randskin = random(312);
  313. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], randskin); //skin
  314. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  315. format(strz, sizeof(strz), "skin %d",randskin);
  316. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  317. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  318. }
  319. else
  320. {
  321. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  322. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  323. format(strz, sizeof(strz), "800.000$");
  324. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  325. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  326. }
  327. }
  328. }
  329. if(rand >= 26 && rand <= 40)
  330. {
  331. if(CaseCount[playerid] == 0)
  332. {
  333. if(PlayerInfo[playerid][pPet] != 0)
  334. {
  335. PlayerInfo[playerid][pPetPoints] += 50;
  336. Update(playerid, pPetPointsx);
  337. format(strings,sizeof strings,"* You win 50 pet points.");
  338. SendClientMessage(playerid,COLOR_YELLOW,strings);
  339. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 19079); //pet points
  340. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  341. format(strz, sizeof(strz), "50 pet points");
  342. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  343. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  344. }
  345. else
  346. {
  347. GivePlayerCash(playerid,400000);
  348. format(strings,sizeof strings,"* You win 400,000$.");
  349. SendClientMessage(playerid,COLOR_YELLOW,strings);
  350. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  351. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  352. format(strz, sizeof(strz), "400.000$");
  353. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  354. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  355. }
  356. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  357. mysql_tquery(SQL,string,"","");
  358. }
  359. else {
  360. if(PlayerInfo[playerid][pPet] != 0)
  361. {
  362. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 19079); //pet points
  363. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  364. format(strz, sizeof(strz), "50 pet points");
  365. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  366. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  367. }
  368. else
  369. {
  370. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  371. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  372. format(strz, sizeof(strz), "400.000$");
  373. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  374. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  375. }
  376. }
  377. }
  378. else if(rand >= 41 && rand <= 55)
  379. {
  380. if(CaseCount[playerid] == 0)
  381. {
  382. PlayerInfo[playerid][pGiftTime] += 100;
  383. Update(playerid, pGiftTimex);
  384. format(strings,sizeof strings,"* You win 100 gift points.");
  385. SendClientMessage(playerid,COLOR_YELLOW,strings);
  386. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  387. mysql_tquery(SQL,string,"","");
  388. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 19054); //gift points
  389. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  390. format(strz, sizeof(strz), "100 gift points");
  391. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  392. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  393. }
  394. else
  395. {
  396. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 19054); //gift points
  397. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  398. format(strz, sizeof(strz), "100 gift points");
  399. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  400. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  401. }
  402. }
  403. else if(rand >= 56 && rand <= 66)
  404. {
  405. if(CaseCount[playerid] == 0)
  406. {
  407. PlayerInfo[playerid][pExp] += 10;
  408. Update(playerid, pExpx);
  409. format(strings,sizeof strings,"* You win 10 respect points.");
  410. SendClientMessage(playerid,COLOR_YELLOW,strings);
  411. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  412. mysql_tquery(SQL,string,"","");
  413. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 2614); //respect points
  414. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  415. format(strz, sizeof(strz), "10 respect points");
  416. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  417. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  418. }
  419. else
  420. {
  421. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 2614); //respect points
  422. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  423. format(strz, sizeof(strz), "10 respect points");
  424. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  425. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  426. }
  427. }
  428. else if(rand >= 67 && rand <= 85)
  429. {
  430. if(CaseCount[playerid] == 0)
  431. {
  432. GivePlayerCash(playerid,200000);
  433. format(strings,sizeof strings,"* You win 200,000$.");
  434. SendClientMessage(playerid,COLOR_YELLOW,strings);
  435. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  436. mysql_tquery(SQL,string,"","");
  437. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  438. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  439. format(strz, sizeof(strz), "200.000$");
  440. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  441. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  442. }
  443. else
  444. {
  445. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  446. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  447. format(strz, sizeof(strz), "200.000$");
  448. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  449. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  450. }
  451. }
  452. else if(rand >= 86 && rand <= 100)
  453. {
  454. if(CaseCount[playerid] == 0)
  455. {
  456. GivePlayerCash(playerid,150000);
  457. format(strings,sizeof strings,"* You win 150,000$.");
  458. SendClientMessage(playerid,COLOR_YELLOW,strings);
  459. mysql_format(SQL, string, sizeof(string), "INSERT INTO opencase_logs (`text`,`PlayerID`) VALUES ('%s','%d')", strings, PlayerInfo[playerid][pSQLID]);
  460. mysql_tquery(SQL,string,"","");
  461. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  462. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  463. format(strz, sizeof(strz), "150.000$");
  464. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  465. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  466. }
  467. else
  468. {
  469. PlayerTextDrawSetPreviewModel(playerid, OpencaseTD[playerid][7], 1550); //money
  470. PlayerTextDrawShow(playerid, OpencaseTD[playerid][7]);
  471. format(strz, sizeof(strz), "150.000$");
  472. PlayerTextDrawSetString(playerid, OpencaseTD[playerid][8], strz);
  473. PlayerTextDrawShow(playerid, OpencaseTD[playerid][8]);
  474. }
  475. }
  476. if(CaseCount[playerid] > 0)
  477. {
  478. if(CaseCount[playerid] >= 10) opencasetimer[playerid] = SetTimerEx("CaseOpen",500, false, "i", playerid);
  479. else if(CaseCount[playerid] >= 5) opencasetimer[playerid] = SetTimerEx("CaseOpen",1000, false, "i", playerid);
  480. else opencasetimer[playerid] = SetTimerEx("CaseOpen",1500, false, "i", playerid);
  481. }
  482. if(CaseCount[playerid] >= 1) CaseCount[playerid]--;
  483. else
  484. {
  485. PlayerInfo[playerid][pCases]--;
  486. Update(playerid,pCasesx);
  487. CaseOpening[playerid] = 0;
  488. }
  489. return 1;
  490. }
  491.  
Advertisement
Add Comment
Please, Sign In to add comment