Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 67.18 KB | None | 0 0
  1. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  2. {
  3.  
  4. new mis = MisID[playerid];
  5.  
  6. if(checkpointid == ForkPlayerBoxCP[playerid])
  7. {
  8. DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
  9. if(ForkPlayerWorking[playerid] == 1)
  10. {
  11. DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
  12. new free = FoundFreeForkBox();
  13. if(free == -1)
  14. {
  15. ForkCheckTimer[playerid] = SetTimerEx("ReplayBoxCheck",1000,true,"d",playerid);
  16. return ShowInfoBox(playerid, 0x00000088, 7, "Couldn't find any crates at the moment please try again later.");
  17. }
  18. else
  19. {
  20. new vehicleid = ForkPlayerVehicle[playerid];
  21. new panels, doors, lights, tires;
  22. new bonnet,boot,ddoor,pdoor;
  23. GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  24. decode_doors(doors, bonnet,boot,ddoor,pdoor);
  25. doors = encode_doors(bonnet, 4, ddoor, pdoor);
  26. UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  27. ShowInfoBox(playerid, 0x00000088, 7, "Load the crates in your van using forklift.");
  28. ForkPlayerWorking[playerid] = 2;
  29. ForkBoxOwned[free] = playerid;
  30. ForkPlayerBoxSlot[playerid] = free;
  31. DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
  32. ForkPlayerBoxCP[playerid] = CreateDynamicCP(BoxPos[free][0],BoxPos[free][1],BoxPos[free][2], 2.0,0,0,playerid,10000000.0);
  33. KillTimer(ForkCheckTimer[playerid]);
  34. ForkPlayerBox[playerid] = CreateDynamicObject(Box_Object,BoxPos[free][0],BoxPos[free][1],BoxPos[free][2]-0.5,0.0,0.0,0.0);
  35.  
  36. }
  37. return 1;
  38. }
  39. if(ForkPlayerWorking[playerid] == 4)
  40. {
  41.  
  42. DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
  43. ForkPlayerWorking[playerid] = 0;
  44. ForkPlayerBoxLoaded[playerid] = 0;
  45. GiveServerMoney(playerid,5000);
  46. GivePlayerRP(playerid,50);
  47. WinnerText(playerid, "Payout $5000 ~n~+100 XP +50 RP");
  48. Info[playerid][XP] += 100;
  49. GivePlayerRP(playerid, 50);
  50. return 1;
  51. }
  52. if(ForkPlayerWorking[playerid] == 3)
  53. {
  54.  
  55. new vehicleid = ForkPlayerVehicle[playerid];
  56. new panels, doors, lights, tires;
  57. new bonnet,boot,ddoor,pdoor;
  58. DestroyDynamicObject(ForkPlayerBox[playerid]);
  59. DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
  60. ForkBoxOwned[ForkPlayerBoxSlot[playerid]] = -1;
  61. ForkPlayerBoxLoaded[playerid]++;
  62. for(new i;i<5;i++)
  63. {
  64. if(ForkPlayerBoxLoaded[playerid] == 5) break;
  65. if(IsValidDynamicObject(ForkPlayerVehBox[playerid][i]))
  66. {
  67. ForkPlayerVehBox[playerid][i] = CreateDynamicObject(1271,0.0,0.0,0.0,0.0,0.0,0.0);
  68. switch(i)
  69. {
  70. case 0: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,-0.581375,0.153053,1.357012,0.000000,0.000000,0.000000); }
  71. case 1: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,0.466183,0.153532,1.361523,0.000000,0.000000,0.000000); }
  72. case 2: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,-0.553421,-1.468998,0.280163,0.000000,0.000000,0.000000); }
  73. case 3: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,0.353253,-1.524713,0.290344,0.000000,0.000000,0.000000); }
  74. case 4: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,-0.109051,-1.425510,0.959936,-0.800000,0.199999,-1.000000); }
  75. }
  76. break;
  77. }
  78. }
  79. if(ForkPlayerBoxLoaded[playerid] == 5)
  80. {
  81. vehicleid = AntiCheatGetVehicleID(playerid);
  82.  
  83. GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  84. decode_doors(doors, bonnet,boot,ddoor,pdoor);
  85. doors = encode_doors(bonnet, 0, ddoor, pdoor);
  86. UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
  87. new rand = random(3);
  88. ForkPlayerWorking[playerid] = 4;
  89. DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
  90. ForkPlayerBoxCP[playerid] = CreateDynamicCP(BoxDeliverPos[rand][0],BoxDeliverPos[rand][1],BoxDeliverPos[rand][2], 2.0,0,0,playerid,10000000.0);
  91. ShowInfoBox(playerid, 0x00000088, 7, "Your van is full now, go to deliver the crates to the required destination.");
  92.  
  93. return 1;
  94. }
  95. else
  96. {
  97. new Free = FoundFreeForkBox();
  98. if(Free != -1)
  99. {
  100. ForkPlayerWorking[playerid] = 2;
  101. ForkBoxOwned[Free] = playerid;
  102. ForkPlayerBoxSlot[playerid] = Free;
  103. DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
  104. ForkPlayerBoxCP[playerid] = CreateDynamicCP(BoxPos[Free][0],BoxPos[Free][1],BoxPos[Free][2], 2.0,0,0,playerid,10000000.0);
  105. KillTimer(ForkCheckTimer[playerid]);
  106. ForkPlayerBox[playerid] = CreateDynamicObject(Box_Object,BoxPos[Free][0],BoxPos[Free][1],BoxPos[Free][2],0.0,0.0,0.0);
  107. return 1;
  108. }
  109. return ForkCheckTimer[playerid] = SetTimerEx("ReplayBoxCheck",1000,true,"d",playerid);
  110. }
  111. }
  112. }
  113. if (checkpointid == ParkingCP [playerid])
  114. {
  115. if (IsPlayerInAnyVehicle (playerid))
  116. {
  117. if (GetPlayerState (playerid) == PLAYER_STATE_DRIVER)
  118. {
  119. new findveh = -1;
  120. for(new i;i<MAX_VEHICLES;i++)
  121. {
  122. if(AntiCheatGetVehicleID(playerid) == vInfo[i][vehSessionID])
  123. {
  124. findveh = i;
  125. break;
  126. }
  127. }
  128. if (findveh != -1 && !IsPlayerUsingPlane (AntiCheatGetVehicleID (playerid)) &&
  129. !IsPlayerUsingBoat (AntiCheatGetVehicleID (playerid)) &&
  130. !IsPlayerUsingHeli (AntiCheatGetVehicleID (playerid)) &&
  131. GetVehicleModel (AntiCheatGetVehicleID (playerid)) != 432 &&
  132. GetVehicleModel (AntiCheatGetVehicleID (playerid)) != 425)
  133. {
  134. if (!strcmp (vInfo [findveh][vehOwner], GetName (playerid)) || isnull (vInfo[findveh][vehOwner]))
  135. {
  136. new string[128];
  137. new vehfind = -1;
  138. for(new i;i<MAX_VEHICLES;i++)
  139. {
  140. if(vInfo[i][vehHouse] == ParkingHouse[playerid])
  141. {
  142. vehfind = i;
  143. break;
  144. }
  145. }
  146. if(vehfind == -1)
  147. {
  148. ShowPlayerDialog(playerid, DIALOG_PARKING, 0, "Parking Vehicle", "Are you sure you want to park this vehicle?!", "Yes", "No");
  149. Parking[playerid] = 1;
  150. }
  151. else
  152. {
  153. format(string,sizeof(string),"Are you sure you want to park this vehicle?!\n Current saved vehicle: %s",GetVehicleName(GetVehicleModel(vInfo[vehfind][vehSessionID])));
  154. ShowPlayerDialog(playerid, DIALOG_PARKING, 0, "Parking Vehicle", string, "Yes", "No");
  155. Parking[playerid] = 1;
  156. }
  157. }
  158. else return SCM(playerid,red,"(!) This vehicle is owned by other player!");
  159. }
  160. else return SCM(playerid,red,"(!) This is not parkable vehicle.");
  161. }
  162. }
  163. return 1;
  164. }
  165.  
  166. if(checkpointid == pCheckPoint[playerid])
  167. {
  168. if(TakingMis[playerid])
  169. {
  170. if(mis == 1)
  171. {
  172. if(MisPart[playerid][mis] == 0)
  173. {
  174. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
  175. DestroyDynamicCP(pCheckPoint[playerid]);
  176. ShowInfoBox(playerid, 0x00000088, 5, "Alright great! Deliver the drugs to Madd Dogg for your reward");
  177. MisPart[playerid][mis] = 1;
  178. SetPlayerMapIcon(playerid, 69 ,1245.8569,-767.3701,92.0477 , 36, 0, MAPICON_GLOBAL);
  179. pCheckPoint[playerid] = CreateDynamicCP(1245.8569,-767.3701,92.0477, 3.0 , -1 , -1 , playerid);
  180. return 1;
  181. }
  182. if(MisPart[playerid][mis] == 1)
  183. {
  184. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
  185. ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
  186. MisPart[playerid][mis] = 0;
  187. FailMis(playerid);
  188. Info[playerid][XP] += 25;
  189. GivePlayerRP(playerid, 25);
  190. GiveServerMoney(playerid,2140);
  191. TextDrawShowForPlayer(playerid,MissionTD[0]);
  192. TextDrawShowForPlayer(playerid,MissionTD[1]);
  193. ShowTD(playerid);
  194.  
  195. if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,321);
  196. if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,428);
  197.  
  198. SavePlayerLog(playerid, "completed mission");
  199.  
  200. if(Info[playerid][Premium] >= 1) {
  201. WinnerText(playerid, "+$2,140 ~n~+25 XP +25 RP~n~+Premium Bonus");
  202. Info[playerid][XP] += 25;
  203. }
  204. else {
  205. WinnerText(playerid, "+$2,140 ~n~+25 XP");
  206. }
  207. return 1;
  208. }
  209. }
  210. if(mis == 2)
  211. {
  212. if(MisPart[playerid][mis] == 0)
  213. {
  214. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
  215. MisPart[playerid][mis] = 1;
  216. DestroyDynamicCP(pCheckPoint[playerid]);
  217. SetPlayerMapIcon(playerid, 69 , 503.0461,-1358.5758,16.1252 , 36, 0, MAPICON_GLOBAL);
  218. pCheckPoint[playerid] = CreateDynamicCP(503.0461,-1358.5758,16.1252, 3.0 , -1 , -1 , playerid);
  219. }
  220. else if(MisPart[playerid][mis] == 1)
  221. {
  222. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
  223. MisPart[playerid][mis] = 2;
  224. DestroyDynamicCP(pCheckPoint[playerid]);
  225. SetPlayerMapIcon(playerid, 69 , 1356.2546,-1757.2971,13.5078 , 36, 0, MAPICON_GLOBAL);
  226. pCheckPoint[playerid] = CreateDynamicCP(1356.2546,-1757.2971,13.5078, 3.0 , -1 , -1 , playerid);
  227. }
  228. else if(MisPart[playerid][mis] == 2)
  229. {
  230. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
  231. ShowInfoBox(playerid, 0x00000088, 5, "Good Job! Deliver it to the Maze Bank for your reward");
  232. MisPart[playerid][mis] = 3;
  233. DestroyDynamicCP(pCheckPoint[playerid]);
  234. pCheckPoint[playerid] = CreateDynamicCP(1571.2587,-1326.5026,16.4844, 3.0 , -1 , -1 , playerid);
  235. SetPlayerMapIcon(playerid, 69 , 1571.2587,-1326.5026,16.4844 , 36 , 0, MAPICON_GLOBAL);
  236. }
  237. else if(MisPart[playerid][mis] == 3)
  238. {
  239. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
  240. ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
  241. MisPart[playerid][mis] = 1;
  242. FailMis(playerid);
  243. Info[playerid][XP] += 25;
  244. GivePlayerRP(playerid, 25);
  245. GiveServerMoney(playerid,2480);
  246. TextDrawShowForPlayer(playerid,MissionTD[0]);
  247. TextDrawShowForPlayer(playerid,MissionTD[1]);
  248. ShowTD(playerid);
  249. if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,372);
  250. if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,496);
  251. SavePlayerLog(playerid, "completed mission");
  252.  
  253. if(Info[playerid][Premium] >= 1) {
  254. WinnerText(playerid, "+$2,480 ~n~+25 XP +25 RP~n~+Premium Bonus");
  255. Info[playerid][XP] += 25;
  256. GivePlayerRP(playerid, 25);
  257. }
  258. else {
  259. WinnerText(playerid, "+$2,480 ~n~+25 XP +25 RP");
  260. }
  261. }
  262. }
  263. if(mis == 3)
  264. {
  265. if(MisPart[playerid][mis] == 0)
  266. {
  267. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
  268. ShowInfoBox(playerid, 0x00000088, 5, "Deliver the police evidence to the Junkyard");
  269. MisPart[playerid][mis] = 1;
  270. SetPlayerMapIcon(playerid, 69 ,2196.4507,-1978.0396,13.5525, 36, 0, MAPICON_GLOBAL);
  271. DestroyDynamicCP(pCheckPoint[playerid]);
  272. pCheckPoint[playerid] = CreateDynamicCP(2196.4507,-1978.0396,13.5525, 3.0 , -1 , -1 , playerid);
  273. }
  274. else if(MisPart[playerid][mis] == 1)
  275. {
  276. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
  277. ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
  278. MisPart[playerid][mis] = 1;
  279. FailMis(playerid);
  280. Info[playerid][XP] += 25;
  281. GivePlayerRP(playerid, 25);
  282. GiveServerMoney(playerid,2230);
  283. TextDrawShowForPlayer(playerid,MissionTD[0]);
  284. TextDrawShowForPlayer(playerid,MissionTD[1]);
  285. ShowTD(playerid);
  286. if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,334);
  287. if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,446);
  288. SavePlayerLog(playerid, "completed mission");
  289.  
  290. if(Info[playerid][Premium] >= 1) {
  291. WinnerText(playerid, "+$2,330 ~n~+25 XP +25 RP~n~+Premium Bonus");
  292. Info[playerid][XP] += 25;
  293. GivePlayerRP(playerid, 25);
  294. }
  295. else {
  296. WinnerText(playerid, "+$2,330 ~n~+25 XP +25 RP");
  297. }
  298. }
  299. }
  300. if(mis == 4)
  301. {
  302. if(MisPart[playerid][mis] == 0)
  303. {
  304. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
  305. ShowInfoBox(playerid, 0x00000088, 5, "Deliver the weapons to the Ammunation");
  306. DestroyDynamicCP(pCheckPoint[playerid]);
  307. MisPart[playerid][mis] = 1;
  308. SetPlayerMapIcon(playerid, 69 ,1364.5814,-1288.4098,13.5469, 36, 0, MAPICON_GLOBAL);
  309. pCheckPoint[playerid] = CreateDynamicCP(1364.5814,-1288.4098,13.5469, 3.0 , -1 , -1 , playerid);
  310. }
  311. else if(MisPart[playerid][mis] == 1)
  312. {
  313. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
  314. ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
  315. MisPart[playerid][mis] = 1;
  316. FailMis(playerid);
  317. Info[playerid][XP] += 25;
  318. GivePlayerRP(playerid, 25);
  319. GiveServerMoney(playerid,2190);
  320. TextDrawShowForPlayer(playerid,MissionTD[0]);
  321. TextDrawShowForPlayer(playerid,MissionTD[1]);
  322. ShowTD(playerid);
  323. if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,328);
  324. if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,438);
  325. SavePlayerLog(playerid, "completed mission");
  326.  
  327. if(Info[playerid][Premium] >= 1) {
  328. WinnerText(playerid, "+$2,190 ~n~+25 XP +25 RP~n~+Premium Bonus");
  329. Info[playerid][XP] += 25;
  330. GivePlayerRP(playerid, 25);
  331. }
  332. else {
  333. WinnerText(playerid, "+$2,190 ~n~+25 XP +25 RP");
  334. }
  335. }
  336. }
  337. if(mis == 5)
  338. {
  339. if(MisPart[playerid][mis] == 0)
  340. {
  341. PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
  342. ShowInfoBox(playerid, 0x00000088, 5, "Deliver the drugs to the Drugs Cartel");
  343. DestroyDynamicCP(pCheckPoint[playerid]);
  344. MisPart[playerid][mis] = 1;
  345. SetPlayerMapIcon(playerid, 69 ,-2178.0286,-224.2853,36.5156, 36, 0, MAPICON_GLOBAL);
  346. pCheckPoint[playerid] = CreateDynamicCP(-2178.0286,-224.2853,36.5156, 3.0 , -1 , -1 , playerid);
  347. }
  348. else if(MisPart[playerid][mis] == 1)
  349. {
  350. PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
  351. ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
  352. MisPart[playerid][mis] = 1;
  353. FailMis(playerid);
  354. Info[playerid][XP] += 25;
  355. GivePlayerRP(playerid, 25);
  356. GiveServerMoney(playerid,6433);
  357. TextDrawShowForPlayer(playerid,MissionTD[0]);
  358. TextDrawShowForPlayer(playerid,MissionTD[1]);
  359. ShowTD(playerid);
  360. if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,964);
  361. if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,1286);
  362. SavePlayerLog(playerid, "completed mission");
  363.  
  364. if(Info[playerid][Premium] >= 1) {
  365. WinnerText(playerid, "+$6,433 ~n~+25 XP +25 RP~n~+Premium Bonus");
  366. Info[playerid][XP] += 25;
  367. GivePlayerRP(playerid, 25);
  368. }
  369. else {
  370. WinnerText(playerid, "+$6,433 ~n~+25 XP");
  371. }
  372. }
  373. }
  374. }
  375. }
  376. if(checkpointid == DrugCP[playerid])
  377. {
  378. if(CalledDrug[playerid] == 1)
  379. {
  380. ShowPlayerDialog(playerid, DIALOG_CALLEDDRUGS, DIALOG_STYLE_LIST, "Drug Dealer", "Cocaine 25 Grams\t$120,000\nCocaine 50 Grams\t$200,000\nMarijuana 25 Grams\t$120,000\nMarijuana 50 Grams\t$200,000", "Buy", "Cancel");
  381. return 1;
  382. }
  383. }
  384. new string[128];
  385. for(new i; i < sizeof(ammuCP); i++) {
  386.  
  387. if(checkpointid == ammuCP[i]) {
  388.  
  389. ShowPlayerDialog(playerid, DIALOG_AMMU, DIALOG_STYLE_TABLIST_HEADERS, "Ammu Nation", "Category\tItems\nMelee\t2\nPistols\t3\nMicro SMGs\t3\nShotguns\t3\nThrown\t1\nArmour\t1\nRifles\t2\nAssault\t2\n", "Select", "Close");
  390. return 1;
  391. }
  392. }
  393.  
  394. if(checkpointid == BuyCP[0]) {
  395. ShowPlayerDialog(playerid, DIALOG_BUYITEM, DIALOG_STYLE_TABLIST_HEADERS, "Cluck'n'Bell", "Name\tPrice\tHealth\nCluckin' Little Meal\t$2\t5HP\nCluckin' Huge Meal\t$5\t10HP\nCluckin' Big Meal\t$10\t25HP\nSalad Meal\t$10\t25HP\n", "Buy", "Close");
  396. return 1;
  397. }
  398. if(checkpointid == BuyCP[2]) {
  399. ShowPlayerDialog(playerid, DIALOG_BUYITEM, DIALOG_STYLE_TABLIST_HEADERS, "Burger Shot", "Name\tPrice\tHealth\nMoo Kids Meal\t$2\t5HP\nBeef Tower\t$5\t10HP\nMeat Stack\t$10\t25HP\nSalad Meal\t$10\t25HP\n", "Buy", "Close");
  400. return 1;
  401. }
  402. if(checkpointid == BuyCP[1]) {// -1 for both = collecting the pickup and it gets destroyed but deliver cp won't be created.
  403. ShowPlayerDialog(playerid, DIALOG_BUYITEM, DIALOG_STYLE_TABLIST_HEADERS, "Well Stack Pizza", "Name\tPrice\tHealth\nBuster\t$2\t5HP\nDouble D-Luxe\t$5\t10HP\nFull Rack\t$10\t25HP\nSalad Meal\t$10\t25HP\n", "Buy", "Close");
  404. return 1;
  405. }
  406. if(checkpointid == Marker[playerid])
  407. {
  408. if(InJob[playerid] == Securicar)
  409. {
  410. DestroyDynamicCP(Marker[playerid]);
  411. Marker[playerid] = -1;
  412. DestroyDynamicPickup(SecuriPickup[playerid]);
  413. PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
  414. ApplyAnimation(playerid, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 500, 1);
  415. SetPlayerAttachedObject(playerid,1, 1550, 6);//Right Hand
  416. new randomLocationa = random(sizeof(DeliverLocations));
  417. Securi[playerid] = randomLocationa;
  418. SecuriCP[playerid] = CreateDynamicCP(DeliverLocations[randomLocationa][0], DeliverLocations[randomLocationa][1], DeliverLocations[randomLocationa][2], 5.0, 0, 0, playerid, 10000000.0);
  419. ShowInfoBox(playerid, 0x00000088, 7, "Deliver the bag to the required destination.");
  420. return 1;
  421. }
  422. }
  423. if(checkpointid == SecuriCP[playerid])
  424. {
  425. if(InJob[playerid] == Securicar)
  426. {
  427. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) != 428) return ShowInfoBox(playerid, 0x00000088, 4, "This is not your job vehicle");
  428. DestroyDynamicCP(SecuriCP[playerid]);
  429. SecuriCP[playerid] = -1;
  430. /*GiveServerMoney(playerid,2000);
  431. Info[playerid][XP] += 100;
  432. GivePlayerRP(playerid, 100);
  433. WinnerText(playerid,"Payout $2000~n~+100 XP +100 RP");*/
  434. if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
  435. new randomLocation4 = random(sizeof(BagsLocations));
  436. Bags[playerid] = randomLocation4;
  437. Marker[playerid] = CreateDynamicCP(BagsLocations[randomLocation4][0], BagsLocations[randomLocation4][1], BagsLocations[randomLocation4][2], 1.0, 0, 0, playerid, 10000000.0);
  438. SecuriPickup[playerid] = CreateDynamicPickup(1550, 1, BagsLocations[randomLocation4][0], BagsLocations[randomLocation4][1], BagsLocations[randomLocation4][2],-1,-1,playerid, 50.0);
  439. ShowInfoBox(playerid, 0x00000088, 7, "Go to collect the bag and deliver it to the required destination.");
  440. SecuriPayout[playerid] = 7500;
  441. if(Info[playerid][Premium] == 2)
  442. GiveServerMoney(playerid, SecuriPayout[playerid] + GetPrecentage(SecuriPayout[playerid], 15));
  443. else if(Info[playerid][Premium] == 3)
  444. GiveServerMoney(playerid, SecuriPayout[playerid] + GetPrecentage(SecuriPayout[playerid], 20));
  445. else GiveServerMoney(playerid, SecuriPayout[playerid]);
  446.  
  447. if(Info[playerid][Premium] >= 1)
  448. {
  449. format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(SecuriPayout[playerid]));
  450. Info[playerid][XP] += 100;
  451. GivePlayerRP(playerid, 100);
  452. }
  453. else
  454. {
  455. format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(SecuriPayout[playerid]));
  456. Info[playerid][XP] += 50;
  457. GivePlayerRP(playerid, 50);
  458. }
  459. LevelUp(playerid);
  460. WinnerText(playerid, string);
  461. }
  462. return 1;
  463. }
  464. if(checkpointid == DeliverCP[playerid])
  465. {
  466. new vehicleid = AntiCheatGetVehicleID(playerid);
  467. if(InJob[playerid] == TowTruck)
  468. {
  469. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 525 && GetVehicleModel(GetVehicleTrailer(vehicleid)) == RandomVehicle[playerid])
  470. {
  471.  
  472. AlreadyTowed[playerid] = 0;
  473. DestroyDynamicCP(DeliverCP[playerid]);
  474. DestroyDynamicMapIcon(vehIcon[playerid]);
  475. DeliverCP[playerid] = -1;
  476. new TrailerID = GetVehicleTrailer(vehicleid);
  477. DestroyVehicle(TrailerID);
  478.  
  479. /*GiveServerMoney(playerid,3000);
  480. Info[playerid][XP] += 100;
  481. GivePlayerRP(playerid, 100);
  482. WinnerText(playerid,"Payout $3,000~n~+100 XP +100 RP");*/
  483. new randomLocation4 = random(sizeof(VehiclesLocations));
  484. new vehicleidz = randomEx(400,410);
  485. VehicleLocation[playerid] = randomLocation4;
  486. BrokenVehicles[playerid] = CreateVehicle(vehicleidz,VehiclesLocations[randomLocation4][0],VehiclesLocations[randomLocation4][1],VehiclesLocations[randomLocation4][2],VehiclesLocations[randomLocation4][3],-1,-1,0);
  487. vehIcon[playerid] = CreateDynamicMapIcon(VehiclesLocations[randomLocation4][0],VehiclesLocations[randomLocation4][1],VehiclesLocations[randomLocation4][2], 36, 0, _, _, playerid, 8000.0, MAPICON_GLOBAL);
  488. ShowInfoBox(playerid, 0x00000088, 5, "Hurry up! there's another broken vehicle it's marked as S icon in your mini-map.");
  489. isLocationAvailableT[VehicleLocation[playerid]] = true;
  490. isLocationAvailableT[randomLocation4] = false;
  491. TowTruckPayout[playerid] = 3000;
  492. if(Info[playerid][Premium] == 2)
  493. GiveServerMoney(playerid, TowTruckPayout[playerid] + GetPrecentage(TowTruckPayout[playerid], 15));
  494. else if(Info[playerid][Premium] == 3)
  495. GiveServerMoney(playerid, TowTruckPayout[playerid] + GetPrecentage(TowTruckPayout[playerid], 20));
  496. else GiveServerMoney(playerid, TowTruckPayout[playerid]);
  497.  
  498. if(Info[playerid][Premium] >= 1)
  499. {
  500. format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(TowTruckPayout[playerid]));
  501. Info[playerid][XP] += 100;
  502. GivePlayerRP(playerid, 100);
  503. }
  504. else
  505. {
  506. format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(TowTruckPayout[playerid]));
  507. Info[playerid][XP] += 50;
  508. GivePlayerRP(playerid, 50);
  509. }
  510. LevelUp(playerid);
  511. WinnerText(playerid, string);
  512.  
  513. }
  514. }
  515. return 1;
  516. }
  517. if(checkpointid == UniformCP[playerid])
  518. {
  519. if(InJob[playerid] == PizzaBoy)
  520. {
  521. if(GetPlayerSkin(playerid) != 155)
  522. {
  523.  
  524. PickupCP[playerid] = CreateDynamicCP(379.8075,-119.0491,1001.4922,2.0, -1, 5, playerid, 100.0);
  525. ShowInfoBox(playerid, 0x00000088, 5, "Pickup the pizza order and deliver it to the required destination using pizzaboy bike.");
  526. SetPlayerSkin(playerid, 155);
  527. DestroyDynamicCP(UniformCP[playerid]);
  528. UniformCP[playerid] = -1;
  529. }
  530. }
  531. return 1;
  532. }
  533. if(checkpointid == PickupCP[playerid])
  534. {
  535. if(InJob[playerid] == PizzaBoy)
  536. {
  537. if(PizzaOrders[playerid] == 0)
  538. {
  539. if(GetPlayerSkin(playerid) == 155)
  540. {
  541. if(HoldingPizza[playerid] == 1) return SCM(playerid,red,"You already have a pizza order.");
  542. HoldingPizza[playerid] = 1;
  543. SetPlayerAttachedObject(playerid, 5,2814 , 1, 0.14, 0.343, 0.004, -0.8, 88.6, 96.4, 1.0, 1.0, 1.0);
  544. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  545. ShowInfoBox(playerid, 0x00000088, 5, "Put the pizza order on the pizzaboy bike using LMB and deliver it to the customer.");
  546. DestroyDynamicCP(PickupCP[playerid]);
  547. //PickupCP[playerid] = -dd1;
  548. PizzaOrders[playerid] = 3;
  549. }
  550. else
  551. {
  552. ShowInfoBox(playerid, 0x00000088, 5, "You need the pizza uniform to pickup a pizza order get it fast.");
  553. UniformCP[playerid] = CreateDynamicCP(369.1347,-115.8160,1001.4922,2.0, -1, 5, playerid, 100.0);
  554. }
  555. }
  556. }
  557. return 1;
  558. }
  559. if(checkpointid == PizzaCP[playerid])
  560. {
  561. if(GetPlayerSkin(playerid) == 155 && DeliveringPizza[playerid] == 1 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  562. {
  563. if(PizzaOrders[playerid] > 1)
  564. {
  565. RemovePlayerAttachedObject(playerid,5);
  566. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  567. DestroyDynamicCP(PizzaCP[playerid]);
  568. PizzaCP[playerid] = -1;
  569. new id = CustomerActorIDz[playerid];
  570. SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
  571. PizzaOrders[playerid] --;
  572.  
  573. new skinid = randomEx(1, 73);
  574. new randomLocation3 = random(sizeof(PizzaLocations));
  575. // while(!isLocationAvailableP[randomLocation3])
  576. randomLocation3 = random(sizeof(PizzaLocations));
  577. Pizza[playerid] = randomLocation3;
  578. isLocationAvailableP[Pizza[playerid]] = false;
  579. ActorCustomer[playerid] = CreateActor(skinid, PizzaLocations[randomLocation3][0], PizzaLocations[randomLocation3][1], PizzaLocations[randomLocation3][2], PizzaLocations[randomLocation3][3]);
  580. ApplyActorAnimation(ActorCustomer[playerid], "DEALER", "DEALER_IDLE", 4.1, 1, 1, 1, 1, 0);
  581.  
  582. CustomerActorIDz[playerid] = ActorCustomer[playerid];
  583. GetXYInFrontOfActor(ActorCustomer[playerid], PizzaLocations[randomLocation3][0], PizzaLocations[randomLocation3][1], 1.0);
  584.  
  585. PizzaCP[playerid] = CreateDynamicCP(PizzaLocations[randomLocation3][0], PizzaLocations[randomLocation3][1], PizzaLocations[randomLocation3][2], 1.0, 0, 0, playerid, 10000000.0);
  586. GivePizzaPayout(playerid);
  587.  
  588. format(string,sizeof(string),"Pizza Orders :%d Player Skin:%d ",PizzaOrders[playerid],GetPlayerSkin(playerid));
  589. SendToAdmins(red,string);
  590. }
  591. else if(PizzaOrders[playerid] == 1)
  592. {
  593. RemovePlayerAttachedObject(playerid,5);
  594. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
  595. DestroyDynamicCP(PizzaCP[playerid]);
  596. PizzaCP[playerid] = -1;
  597. new id = CustomerActorIDz[playerid];
  598. SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
  599. PizzaOrders[playerid] = 0;
  600. PlayerTextDrawHide(playerid,TimeTDP[playerid]);
  601. PlayerTextDrawHide(playerid,OrdersText[playerid]);
  602. KillTimer(PizzaTimer[playerid]);
  603. PickupCP[playerid] = CreateDynamicCP(379.8075,-119.0491,1001.4922,2.0, -1, 5, -1, 100.0);
  604. ShowInfoBox(playerid, 0x00000088, 7, "There's another pizza orders waiting for you to catch it hurry up.");
  605. DeliveringPizza[playerid] = 0;
  606. GivePizzaPayout(playerid);
  607.  
  608. format(string,sizeof(string),"Pizza Orders :%d Player Skin:%d ",PizzaOrders[playerid],GetPlayerSkin(playerid));
  609. SendToAdmins(red,string);
  610. }
  611. }
  612. return 1;
  613. }
  614. /*if(checkpointid == BoxDeliverCP[playerid])
  615. {
  616. InJob[playerid] = NOJOB;
  617. GiveBurglarPayout(playerid);
  618. DestroyDynamicCP(BoxDeliverCP[playerid]);
  619. }
  620. for(new i = 0; i < MAX_BOX_COUNT; ++i)
  621. {
  622. if(checkpointid == BurglaryCP[playerid][i])
  623. {
  624. if(InJob[playerid] == Burglary)
  625. {
  626. if(HoldingzBox[playerid] == 1) return SCM(playerid,red,"You are already holding a box load it into the boxvile and come getthis one");
  627. if(CollectedBoxes[playerid] == 0 || CollectedBoxes[playerid] < 0)
  628. {
  629. HoldingzBox[playerid] = 1;
  630. // DestroyDynamicCP(BurglaryCP[playerid][i]);
  631. SetPlayerAttachedObject(playerid, 6,2969 , 1, 0.14, 0.343, 0.004, -0.8, 88.6, 96.4, 1.0, 1.0, 1.0);
  632. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
  633. }
  634. }
  635. }
  636. return 1;
  637. }*/
  638. if(checkpointid == TruckerCP[playerid])
  639. {
  640. new vehicleid = AntiCheatGetVehicleID(playerid);
  641. if(InJob[playerid] == Trucker)
  642. {
  643. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) != 515 || GetVehicleModel(GetVehicleTrailer(vehicleid)) != 584)
  644. {
  645. FailTrucker(playerid);
  646. PlayerTextDrawHide(playerid,TimeTDT[playerid]);
  647. ShowInfoBox(playerid, 0x00000088, 5, "The Job is over you have lost the trailer.");
  648.  
  649. }
  650. else if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 515 && GetVehicleModel(GetVehicleTrailer(vehicleid)) == 584)
  651. {
  652. InJob[playerid] = NOJOB;
  653. KillTimer(TruckTimer[playerid]);
  654. DestroyDynamicCP(TruckerCP[playerid]);
  655. new TrailerID = GetVehicleTrailer(vehicleid);
  656. DestroyVehicle(TrailerID);
  657. TruckerCP[playerid] = -1;
  658. /*GiveServerMoney(playerid,7500);
  659. WinnerText(playerid,"Payout $7,500~n~+100 XP +100 RP");
  660. Info[playerid][XP] += 100;
  661. GivePlayerRP(playerid, 100);*/
  662. PlayerTextDrawHide(playerid,TimeTDT[playerid]);
  663. isLocationAvailableTr[TruckT[playerid]] = true;
  664. TruckerPayout[playerid] = 7500;
  665. if(Info[playerid][Premium] == 2)
  666. GiveServerMoney(playerid, TruckerPayout[playerid] + GetPrecentage(TruckerPayout[playerid], 15));
  667. else if(Info[playerid][Premium] == 3)
  668. GiveServerMoney(playerid, TruckerPayout[playerid] + GetPrecentage(TruckerPayout[playerid], 20));
  669. else GiveServerMoney(playerid, TruckerPayout[playerid]);
  670.  
  671. if(Info[playerid][Premium] >= 1)
  672. {
  673. format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(TruckerPayout[playerid]));
  674. Info[playerid][XP] += 100;
  675. GivePlayerRP(playerid, 100);
  676. }
  677. else
  678. {
  679. format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(TruckerPayout[playerid]));
  680. Info[playerid][XP] += 50;
  681. GivePlayerRP(playerid, 50);
  682. }
  683. LevelUp(playerid);
  684. WinnerText(playerid, string);
  685.  
  686. }
  687. }
  688. }
  689. if(checkpointid == PlayerMarker[playerid]) {
  690.  
  691. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 462) {
  692.  
  693. if(!IsValidObject(AttachedObject[playerid]) || !ObjectAttached[AttachedObject[playerid]]) {
  694.  
  695. InJob[playerid] = NOJOB;
  696.  
  697. new id = CustomerActorID[playerid];
  698. ApplyActorAnimation(id, "GRAVEYARD", "MRNF_LOOP", 4.1, 1, 1, 1, 1, 0);
  699. SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
  700. DestroyDynamicCP(PlayerMarker[playerid]);
  701. KillTimer(DeliveryTimer[playerid]);
  702.  
  703. if(IsValidObject(AttachedObject[playerid]))
  704. DestroyObject(AttachedObject[playerid]);
  705.  
  706. if(IsValidObject(DroppedObject[playerid]))
  707. DestroyObject(DroppedObject[playerid]);
  708.  
  709. PlayerMarker[playerid] = -1;
  710.  
  711. ObjectAttached[AttachedObject[playerid]] = false;
  712. isLocationAvailable[PacketCustomer[playerid]] = true;
  713.  
  714. ShowInfoBox(playerid, 0x00000088, 5, "The job is over, you have lost the packet!");
  715. }
  716. else if(ObjectAttached[AttachedObject[playerid]]) {
  717.  
  718. InJob[playerid] = NOJOB;
  719.  
  720. new id = CustomerActorID[playerid];
  721. ApplyActorAnimation(id, "GANGS", "DEALER_DEAL", 4.1, false, false, false, false, false);
  722.  
  723. SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
  724. SetTimerEx("ReApplyAnimation", 1500, 0, "i", id);
  725.  
  726. KillTimer(DeliveryTimer[playerid]);
  727. DestroyDynamicCP(PlayerMarker[playerid]);
  728. DestroyObject(AttachedObject[playerid]);
  729.  
  730. if(Info[playerid][Premium] == 2)
  731. GiveServerMoney(playerid, PacketPayout[playerid] + GetPrecentage(PacketPayout[playerid], 15));
  732. else if(Info[playerid][Premium] == 3)
  733. GiveServerMoney(playerid, PacketPayout[playerid] + GetPrecentage(PacketPayout[playerid], 20));
  734. else GiveServerMoney(playerid, PacketPayout[playerid]);
  735.  
  736. Info[playerid][PostmanSkills]++;
  737. PlayerMarker[playerid] = -1;
  738. ObjectAttached[AttachedObject[playerid]] = false;
  739. isLocationAvailable[PacketCustomer[playerid]] = true;
  740.  
  741. if(Info[playerid][Premium] >= 1) {
  742.  
  743. format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(PacketPayout[playerid]));
  744. Info[playerid][XP] += 100;
  745. GivePlayerRP(playerid, 100);
  746. }
  747. else {
  748.  
  749. format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(PacketPayout[playerid]));
  750. Info[playerid][XP] += 50;
  751. GivePlayerRP(playerid, 25);
  752. }
  753. LevelUp(playerid);
  754. WinnerText(playerid, string);
  755.  
  756. mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `PostmanSkills` = %i WHERE `ID` = %i", Info[playerid][PostmanSkills], Info[playerid][ID]);
  757. mysql_tquery(mysql, string);
  758. }
  759. }
  760. }
  761. if(checkpointid == SkinCP)
  762. {
  763. cmd_skinsusingfor(playerid,"");
  764. }
  765. if(checkpointid == sCheckpoints[0]) {
  766.  
  767. if(InSkydive[playerid] == 1) {
  768.  
  769. format(string, sizeof(string), "{ff6347}%s has finished Skydive #1 and received a reward", GetName(playerid));
  770. SendClientMessageToAll(0x00FFFFFF, string);
  771.  
  772. if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1233 + GetPrecentage(1233, 25));
  773. else GiveServerMoney(playerid, 1233);
  774.  
  775. if(Info[playerid][Premium] >= 1) {
  776. WinnerText(playerid, "+$1,233 ~n~+100 XP +150 RP~n~+Premium Bonus");
  777. Info[playerid][XP] += 200;
  778. GivePlayerRP(playerid, 150);
  779. }
  780. else {
  781. WinnerText(playerid, "+$1,233 ~n~+100 XP +50 RP");
  782. Info[playerid][XP] += 100;
  783. GivePlayerRP(playerid, 50);
  784. }
  785. LevelUp(playerid);
  786. SpawnPlayerEx(playerid);
  787. new query[100];
  788. mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
  789. mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
  790. InSkydive[playerid] = 0;
  791. Info[playerid][Skydive]++;
  792. }
  793. }
  794. if(checkpointid == sCheckpoints[1]) {
  795.  
  796. if(InSkydive[playerid] == 1) {
  797.  
  798. format(string, sizeof(string), "{ff6347}%s has finished Skydive #2 and received a reward", GetName(playerid));
  799. SendClientMessageToAll(0x00FFFFFF, string);
  800.  
  801. if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1 + GetPrecentage(1666, 25));
  802. else GiveServerMoney(playerid, 1666);
  803.  
  804. if(Info[playerid][Premium] >= 1) {
  805. WinnerText(playerid, "+$1,666 ~n~+100 XP +150 RP~n~+Premium Bonus");
  806. Info[playerid][XP] += 200;
  807. GivePlayerRP(playerid, 150);
  808. }
  809. else {
  810. WinnerText(playerid, "+$1,666 ~n~+100 XP +50 RP");
  811. Info[playerid][XP] += 100;
  812. GivePlayerRP(playerid, 50);
  813. }
  814. LevelUp(playerid);
  815. SpawnPlayerEx(playerid);
  816. new query[100];
  817. mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
  818. mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
  819. InSkydive[playerid] = 0;
  820. Info[playerid][Skydive]++;
  821. }
  822. }
  823.  
  824. if(checkpointid == sCheckpoints[2]) {
  825.  
  826. if(InSkydive[playerid] == 1) {
  827.  
  828. format(string, sizeof(string), "{ff6347}%s has finished Skydive #3 and received a reward", GetName(playerid));
  829. SendClientMessageToAll(0x00FFFFFF, string);
  830.  
  831. if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1558 + GetPrecentage(1558, 25));
  832. else GiveServerMoney(playerid, 1558);
  833.  
  834. if(Info[playerid][Premium] >= 1) {
  835. WinnerText(playerid, "+$1,558 ~n~+100 XP +150 RP~n~+Premium Bonus");
  836. Info[playerid][XP] += 200;
  837. GivePlayerRP(playerid, 150);
  838. }
  839. else {
  840. WinnerText(playerid, "+$1,558 ~n~+100 XP + 50 RP");
  841. Info[playerid][XP] += 100;
  842. GivePlayerRP(playerid, 50);
  843. }
  844. LevelUp(playerid);
  845. SpawnPlayerEx(playerid);
  846. new query[100];
  847. mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
  848. mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
  849. InSkydive[playerid] = 0;
  850. Info[playerid][Skydive]++;
  851. }
  852. }
  853. if(checkpointid == pCheckpoints[0]) {
  854.  
  855. if(InParkour[playerid] == 1) {
  856.  
  857. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 556) {
  858.  
  859. format(string, sizeof(string), "{ff6347}%s has finished Parkour #2 and received a reward", GetName(playerid));
  860. SendClientMessageToAll(0x00FFFFFF, string);
  861.  
  862. DestroyVehicle(AntiCheatGetVehicleID(playerid));
  863. InParkour[playerid] = 0;
  864. Info[playerid][Parkour]++;
  865.  
  866. if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 870 + GetPrecentage(870, 25));
  867. else GiveServerMoney(playerid, 870);
  868.  
  869. if(Info[playerid][Premium] >= 1) {
  870. WinnerText(playerid, "+$870 ~n~+100 XP +150 RP~n~+Premium Bonus");
  871. Info[playerid][XP] += 200;
  872. GivePlayerRP(playerid, 150);
  873. }
  874. else {
  875. WinnerText(playerid, "+$2,190 ~n~+100 XP +50 RP");
  876. Info[playerid][XP] += 100;
  877. GivePlayerRP(playerid, 50);
  878. }
  879.  
  880. LevelUp(playerid);
  881. SpawnPlayerEx(playerid);
  882. new query[100];
  883. mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
  884. mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
  885. }
  886. }
  887. }
  888. if(checkpointid == pCheckpoints[1]) {
  889.  
  890. if(InParkour[playerid] == 1) {
  891.  
  892. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 522) {
  893.  
  894. new Float:x, Float:y, Float:z, Float:a;
  895. AntiCheatGetPos(playerid, x, y, z);
  896. GetPlayerFacingAngle(playerid, a);
  897. DestroyVehicle(AntiCheatGetVehicleID(playerid));
  898. new veh = CreateVehicle(481, x, y, z, a, 211, 211, 1, 0);
  899. PutPlayerInVehicle(playerid, veh, 0);
  900. }
  901. }
  902. }
  903. if(checkpointid == pCheckpoints[2]) {
  904.  
  905. if(InParkour[playerid] == 1) {
  906.  
  907. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 481) {
  908.  
  909. new Float:x, Float:y, Float:z, Float:a;
  910. AntiCheatGetPos(playerid, x, y, z);
  911. GetPlayerFacingAngle(playerid, a);
  912. DestroyVehicle(AntiCheatGetVehicleID(playerid));
  913. new veh = CreateVehicle(522, x, y, z, a, 211, 1, 1, 0);
  914. PutPlayerInVehicle(playerid, veh, 0);
  915. }
  916. }
  917. }
  918. if(checkpointid == pCheckpoints[3]) {
  919.  
  920. if(InParkour[playerid] == 1) {
  921.  
  922. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 522) {
  923.  
  924. format(string, sizeof(string), "{ff6347}%s has finished Parkour #4 and received a reward", GetName(playerid));
  925. SendClientMessageToAll(0x00FFFFFF, string);
  926.  
  927. if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1040 + GetPrecentage(1040, 25));
  928. else GiveServerMoney(playerid, 1040);
  929.  
  930. DestroyVehicle(AntiCheatGetVehicleID(playerid));
  931.  
  932. if(Info[playerid][Premium] >= 1) {
  933. WinnerText(playerid, "+$1,040 ~n~+100 XP +150 RP~n~+Premium Bonus");
  934. Info[playerid][XP] += 200;
  935. GivePlayerRP(playerid, 150);
  936. }
  937. else {
  938. WinnerText(playerid, "+$1,040 ~n~+100 XP +50 RP");
  939. Info[playerid][XP] += 100;
  940. GivePlayerRP(playerid, 50);
  941. }
  942. LevelUp(playerid);
  943. InParkour[playerid] = 0;
  944. Info[playerid][Parkour]++;
  945. SpawnPlayerEx(playerid);
  946. new query[100];
  947. mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
  948. mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
  949. }
  950. }
  951. }
  952. if(checkpointid == pCheckpoints[4]) {
  953.  
  954. if(InParkour[playerid] == 1) {
  955.  
  956. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 481) {
  957.  
  958. format(string, sizeof(string), "{ff6347}%s has finished Parkour #5 and received a reward", GetName(playerid));
  959. SendClientMessageToAll(0x00FFFFFF, string);
  960.  
  961. if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1114 + GetPrecentage(1114, 25));
  962. else GiveServerMoney(playerid, 1114);
  963.  
  964. DestroyVehicle(AntiCheatGetVehicleID(playerid));
  965. if(Info[playerid][Premium] >= 1) {
  966. WinnerText(playerid, "+$1,114 ~n~+100 XP +150 RP~n~+Premium Bonus");
  967. Info[playerid][XP] += 200;
  968. GivePlayerRP(playerid, 150);
  969. }
  970. else {
  971. WinnerText(playerid, "+$1,114 ~n~+100 XP +50 RP");
  972. Info[playerid][XP] += 100;
  973. GivePlayerRP(playerid, 50);
  974. }
  975. LevelUp(playerid);
  976. InParkour[playerid] = 0;
  977. Info[playerid][Parkour]++;
  978. SpawnPlayerEx(playerid);
  979. new query[100];
  980. mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
  981. mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
  982. }
  983. }
  984. }
  985. if(checkpointid == HeistStart)//heist
  986. {
  987. ShowPlayerDialog(playerid, DIALOG_LSHEIST, DIALOG_STYLE_LIST, "Los Santos Heist Missions", "Player Center\nJewerly Store\nPlane\n", "Select", "Close");
  988. }
  989. if(checkpointid == RobCP)//heist
  990. {
  991. if(InHeist[playerid][PCENTER ]== 1)
  992. {
  993. ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
  994. ApplyActorAnimation(RobActor, "ped","handsup",4.1,0,1,1,1,0);
  995. rCountAmount[playerid] = 10;
  996. rRobbingTimer[playerid] = SetTimerEx("rRobbingSeller", 10000, 0, "d", playerid);
  997. rCountTimer[playerid] = SetTimerEx("rRobTimer", 10000, 1, "i", playerid);
  998. }
  999. }
  1000. if(checkpointid == KeypadCP[playerid])
  1001. {
  1002. Hack[playerid] = 1;
  1003. }
  1004. if(checkpointid == FarmerCP[playerid])
  1005. {
  1006. if(Harvested[playerid] != MAX_HARVEST)
  1007. {
  1008. if(InJob[playerid] == Farmer)
  1009. {
  1010. format(string,64,"~g~%d OUT OF~n~~g~10",Harvested[playerid]);
  1011. GameTextForPlayer(playerid,string,3000,1);
  1012. Harvested[playerid] += 1;
  1013. DestroyDynamicCP(FarmerCP[playerid]);
  1014. DestroyDynamicObject(FarmerObject[playerid]);
  1015. FarmerCP[playerid] = -1;
  1016. FarmerObject[playerid] = -1;//3ndko sex fe al host ?
  1017. new randomLocation4 = random(sizeof(FarmerLocations));
  1018. while(!isLocationAvailableF[randomLocation4])
  1019. randomLocation4 = random(sizeof(FarmerLocations));
  1020. isLocationAvailableF[randomLocation4] = false;
  1021. FarmerCP[playerid] = CreateDynamicCP(FarmerLocations[randomLocation4][0], FarmerLocations[randomLocation4][1], FarmerLocations[randomLocation4][2], 3.0, 0, 0, playerid, 10000000.0);
  1022. FarmerObject[playerid] = CreateDynamicObject(805,FarmerLocations[randomLocation4][0], FarmerLocations[randomLocation4][1], FarmerLocations[randomLocation4][2], 0.0, 0.0, 0.0);
  1023. return 1;
  1024. }
  1025. }
  1026. else if(Harvested[playerid] == MAX_HARVEST)
  1027. {
  1028. FailFarmer(playerid);
  1029. FarmerPayout[playerid] = 3500;
  1030. if(Info[playerid][Premium] == 2)
  1031. GiveServerMoney(playerid, FarmerPayout[playerid] + GetPrecentage(FarmerPayout[playerid], 15));
  1032. else if(Info[playerid][Premium] == 3)
  1033. GiveServerMoney(playerid, FarmerPayout[playerid] + GetPrecentage(FarmerPayout[playerid], 20));
  1034. else GiveServerMoney(playerid, FarmerPayout[playerid]);
  1035.  
  1036. if(Info[playerid][Premium] >= 1)
  1037. {
  1038. format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(FarmerPayout[playerid]));
  1039. Info[playerid][XP] += 100;
  1040. GivePlayerRP(playerid, 100);
  1041. }
  1042. else
  1043. {
  1044. format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(FarmerPayout[playerid]));
  1045. Info[playerid][XP] += 50;
  1046. GivePlayerRP(playerid, 50);
  1047. }
  1048. LevelUp(playerid);
  1049. WinnerText(playerid, string);
  1050. }
  1051. return 1;
  1052. }
  1053. if(checkpointid == LoadingPoint[playerid])
  1054. {
  1055. if(GetPVarInt(playerid, "LoadingCooldown") > gettime()) return 1;
  1056. new vehicleid = GetPVarInt(playerid, "LastVehicleID");
  1057.  
  1058. if(Vehicle_LoadedOres(vehicleid) >= VEHICLE_LIMIT) return SCM(playerid, red, "You can't load any more ores to this vehicle");
  1059. if(Vehicle_LoadedOres(vehicleid) <= VEHICLE_LIMIT)
  1060. {
  1061.  
  1062. LoadedOres[vehicleid][ CarryingOre[playerid] ]++;
  1063.  
  1064. format(string, sizeof(string), "Loaded %s", OreData[ CarryingOre[playerid] ][oreName]);
  1065. SCM(playerid, green, string);
  1066.  
  1067. OnePlayAnim(playerid, "CARRY", "putdwn05", 4.1, 0, 1, 1, 0, 0);
  1068. Player_CleanUp(playerid, 1);
  1069.  
  1070. return 1;
  1071. }
  1072. }
  1073. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  1074. {
  1075. new vehicleid = AntiCheatGetVehicleID(playerid);
  1076. for(new i; i < sizeof(DropPoints); i++)
  1077. {
  1078. if(checkpointid == DropPoints[i][PointCP])
  1079. {
  1080. new cash = Vehicle_GetOreValue(vehicleid);
  1081.  
  1082. Info[playerid][MiningSkills]++;
  1083. mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `MiningSkills` = %i WHERE `ID` = %i", Info[playerid][MiningSkills], Info[playerid][ID]);
  1084. mysql_tquery(mysql, string);
  1085.  
  1086.  
  1087. if(Info[playerid][Premium] >= 1) {
  1088.  
  1089. format(string, sizeof(string), "Payout $%s~n~+100 XP +50 RP", cNumber(cash));
  1090. Info[playerid][XP] += 100;
  1091. GivePlayerRP(playerid, 50);
  1092. }
  1093. else {
  1094.  
  1095. format(string, sizeof(string), "Payout $%s~n~+50 XP +25 RP", cNumber(cash));
  1096. Info[playerid][XP] += 50;
  1097. GivePlayerRP(playerid, 25);
  1098. }
  1099. LevelUp(playerid);
  1100. WinnerText(playerid, string);
  1101.  
  1102. if(Info[playerid][Premium] == 2)
  1103. GiveServerMoney(playerid, cash + GetPrecentage(cash, 15));
  1104. else if(Info[playerid][Premium] == 3)
  1105. GiveServerMoney(playerid, cash + GetPrecentage(cash, 20));
  1106. else GiveServerMoney(playerid, cash);
  1107.  
  1108. Vehicle_CleanUp(vehicleid);
  1109.  
  1110. for(new x; x < sizeof(DropPoints); x++)
  1111. {
  1112. if(IsValidDynamicMapIcon(PointIcons[playerid][x]))
  1113. {
  1114. DestroyDynamicMapIcon(PointIcons[playerid][x]);
  1115. PointIcons[playerid][x] = -1;
  1116. }
  1117. TogglePlayerDynamicCP(playerid, DropPoints[x][PointCP], 0);
  1118. }
  1119. break;
  1120. }
  1121. }
  1122.  
  1123. /*for(new i; i < sizeof(PoliceDepartments); i++) {
  1124.  
  1125. if(checkpointid == PoliceDepartments[i][pdPickup]) {
  1126.  
  1127. if(pTeam[playerid] != POLICE) {
  1128.  
  1129. for(new pickups; pickups < sizeof(PoliceDepartments); pickups++)
  1130. TogglePlayerDynamicCP(playerid, PoliceDepartments[pickups][pdPickup], 0);
  1131. return 1;
  1132. }
  1133.  
  1134. if(!IsPoliceVehicle(vehicleid)) return ShowInfoBox(playerid, 0x00000088, 5, "You can't jail criminals with this vehicle");
  1135.  
  1136. foreach(new criminal : Player) {
  1137.  
  1138. if(!IsPlayerInVehicle(criminal, vehicleid)) continue;
  1139. if(criminal == playerid) continue;
  1140. if(!IsCuffed[criminal]) continue;
  1141.  
  1142. CriminalCooldown[criminal] = 0;
  1143. IsCuffed[criminal] = 0;
  1144. CuffedBy[criminal] = INVALID_PLAYER_ID;
  1145.  
  1146. if(LastCriminal[playerid] == criminal)
  1147. LastCriminal[playerid] = INVALID_PLAYER_ID;
  1148.  
  1149. //police_payout
  1150. new payout = (5000 + (500 * GetPoliceHoods()));
  1151. GiveServerMoney(playerid, payout);
  1152.  
  1153. format(string, sizeof string, "Payout $%s", cNumber(payout));
  1154. WinnerText(playerid, string);
  1155.  
  1156. for(new pickups; pickups < sizeof(PoliceDepartments); pickups++)
  1157. TogglePlayerDynamicCP(playerid, PoliceDepartments[pickups][pdPickup], 0);
  1158.  
  1159. AntiCheatGetPos(criminal, LastPosX[criminal], LastPosY[criminal], LastPosZ[criminal]);
  1160. AntiCheatGetArmour(criminal, LastArmour[criminal]);
  1161.  
  1162. LastHealth[criminal] = 99.0;
  1163. LastInterior[criminal] = 0;
  1164. InJob[criminal] = NOJOB;
  1165.  
  1166. if(Info[criminal][Premium] > 1) {
  1167.  
  1168. new query[128], weaponid, ammo;
  1169. for (new x = 0; x <= 12; x++) {
  1170.  
  1171. AntiCheatGetWeaponData(criminal, x, weaponid, ammo);
  1172.  
  1173. if(!weaponid || !ammo) continue;
  1174.  
  1175. mysql_format(mysql, query, sizeof(query), "INSERT INTO `Weapons` (ID, Weapon, Ammo) VALUES (%d, %d, %d) ON DUPLICATE KEY UPDATE `Ammo` = %d", Info[criminal][ID], weaponid, ammo, ammo);
  1176. mysql_tquery(mysql, query);
  1177. }
  1178. }
  1179.  
  1180. ResetPlayerWeapons(criminal);
  1181. RemovePlayerFromVehicle(criminal);
  1182. SetPlayerSpecialAction(criminal, SPECIAL_ACTION_NONE);
  1183. SetPlayerPos(criminal, 264.6288, 77.5742, 1001.0391);
  1184. SetPlayerInterior(criminal, 6);
  1185.  
  1186. SetPlayerHealth(criminal, 99.0);
  1187. TogglePlayerControllable(criminal, 1);
  1188. SetPlayerVirtualWorld(criminal, criminal);
  1189.  
  1190. switch(GetPlayerWantedLevel(criminal)) {
  1191.  
  1192. case 1: Info[criminal][Jailed] = 30; aywa ma ana 2olt mn el awel h3ml kda
  1193. case 2: Info[criminal][Jailed] = 60;
  1194. case 3: Info[criminal][Jailed] = 120;
  1195. case 4: Info[criminal][Jailed] = 180;
  1196. case 5: Info[criminal][Jailed] = 240;
  1197. case 6: Info[criminal][Jailed] = 320;
  1198. }
  1199.  
  1200. JailTimer[criminal] = SetTimerEx("JailCountdown", 999, true, "i", criminal);
  1201. }
  1202. }
  1203. }*/
  1204. }
  1205. if(checkpointid == CrusherCheckpoint)
  1206. {
  1207. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid, red, "You must have a vehicle to use the crusher");
  1208. if(!IsVehicleWanted(AntiCheatGetVehicleID(playerid))) return SCM(playerid, red, "Invalid vehicle model - check the wanted list");
  1209. if(GetPVarInt(playerid, "LastCrusherVehicle") == GetVehicleModel(AntiCheatGetVehicleID(playerid))) return SCM(playerid, red, "You can't use the same vehicle twice");
  1210.  
  1211. foreach(new i : ServerVehicles) {
  1212.  
  1213. if(IsPlayerInVehicle(playerid, vInfo[i][vehSessionID])) {
  1214.  
  1215. if(strcmp(vInfo[i][vehName], "-")) return SCM(playerid, red, "You can't export private vehicles");
  1216. }
  1217. }
  1218.  
  1219. SetPVarInt(playerid, "LastCrusherVehicle", GetVehicleModel(AntiCheatGetVehicleID(playerid)));
  1220. SetVehicleToRespawn(AntiCheatGetVehicleID(playerid));
  1221.  
  1222. new money = randomEx(2500, 7500);
  1223. if(Info[playerid][Premium] >= 1) {
  1224. format(string, sizeof(string), "Payout $%s~n~+100 XP +50 RP", cNumber(money));
  1225. Info[playerid][XP] += 100;
  1226. GivePlayerRP(playerid, 50);
  1227. }
  1228. else {
  1229.  
  1230. format(string, sizeof(string), "Payout $%s~n~+50 XP +25 RP", cNumber(money));
  1231. Info[playerid][XP] += 50;
  1232. GivePlayerRP(playerid, 25);
  1233. }
  1234.  
  1235. LevelUp(playerid);
  1236. GiveServerMoney(playerid, money);
  1237. WinnerText(playerid, string);
  1238. return 1;
  1239. }
  1240. if(checkpointid == TrashCP[playerid])
  1241. {
  1242. if(!HasTrash[playerid]) return SCM(playerid, red, "You're not carrying a trash bag");
  1243.  
  1244. new vehicleid = GetPVarInt(playerid, "LastVehicleID");
  1245. if(LoadedTrash[vehicleid] >= TRASH_LIMIT) return SCM(playerid, red, "This vehicle is full, you can't load any more trash");
  1246.  
  1247. LoadedTrash[vehicleid]++;
  1248. OnePlayAnim(playerid, "GRENADE", "WEAPON_throwu", 4.1, 0, 0, 0, 0, 0);
  1249. SCM(playerid, green, "You've collected a trash bag");
  1250.  
  1251. if(TRASH_LIMIT - LoadedTrash[vehicleid] > 0)
  1252. {
  1253. format(string, sizeof(string), "You can load %d more trash bags to this vehicle", TRASH_LIMIT - LoadedTrash[vehicleid]);
  1254. SCM(playerid, 0x2ECC71FF, string);
  1255. }
  1256.  
  1257. new driver = AntiCheatGetVehicleDriver(vehicleid);
  1258. if(IsPlayerConnected(driver)) Trash_ShowCapacity(driver);
  1259. Trash_ResetPlayer(playerid);
  1260. return 1;
  1261. }
  1262. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  1263. {
  1264. for(new i; i < sizeof(FactoryData); i++)
  1265. {
  1266. if(checkpointid == FactoryData[i][FactoryCP])
  1267. {
  1268. new vehicleid = AntiCheatGetVehicleID(playerid), cash = LoadedTrash[vehicleid] * TRASH_BAG_VALUE, xp = LoadedTrash[vehicleid] * 5;
  1269.  
  1270. if(LoadedTrash[vehicleid] > 4) {
  1271.  
  1272. Info[playerid][TrashSkills]++;
  1273.  
  1274. mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `TrashSkills` = %i WHERE `ID` = %i", Info[playerid][TrashSkills], Info[playerid][ID]);
  1275. mysql_tquery(mysql, string);
  1276. }
  1277.  
  1278. if(Info[playerid][Premium] >= 1) {
  1279.  
  1280. new premiumxp = xp * 2;
  1281.  
  1282. format(string, sizeof(string), "Payout $%s~n~+%i XP", cNumber(cash), premiumxp);
  1283. Info[playerid][XP] += premiumxp;
  1284.  
  1285. }
  1286. else {
  1287.  
  1288. format(string, sizeof(string), "Payout $%s~n~+%i XP", cNumber(cash), xp);
  1289. Info[playerid][XP] += xp;
  1290. }
  1291. LevelUp(playerid);
  1292. WinnerText(playerid, string);
  1293.  
  1294. if(Info[playerid][Premium] == 2)
  1295. GiveServerMoney(playerid, cash + GetPrecentage(cash, 15));
  1296. else if(Info[playerid][Premium] == 3)
  1297. GiveServerMoney(playerid, cash + GetPrecentage(cash, 20));
  1298. else GiveServerMoney(playerid, cash);
  1299.  
  1300. FactoryData[i][FactoryCurrent] += LoadedTrash[vehicleid];
  1301. LoadedTrash[vehicleid] = 0;
  1302. Trash_ShowCapacity(playerid);
  1303. format(string, sizeof(string), "Recycling Factory - %s\n\n{FFFFFF}Current Trash Bags: {F39C12}%d\n{FFFFFF}Bring trash here to earn money!", FactoryData[i][FactoryName], FactoryData[i][FactoryCurrent]);
  1304. UpdateDynamic3DTextLabelText(FactoryData[i][FactoryLabel], 0x2ECC71FF, string);
  1305.  
  1306. for(new x; x < sizeof(FactoryData); x++)
  1307. {
  1308. if(IsValidDynamicMapIcon(FactoryIcons[playerid][x]))
  1309. {
  1310. DestroyDynamicMapIcon(FactoryIcons[playerid][x]);
  1311. FactoryIcons[playerid][x] = -1;
  1312. }
  1313. TogglePlayerDynamicCP(playerid, FactoryData[x][FactoryCP], 0);
  1314. }
  1315. break;
  1316. }
  1317. }
  1318. }
  1319. if(checkpointid == CenterCheckpoint) {
  1320.  
  1321. ShowPlayerDialog(playerid, DIALOG_CENTER, DIALOG_STYLE_LIST, "Player Center", //Fight Styles,Property Reenew, House Renew, // box = 73482, kung fu = 94631, knee = 58433
  1322. "{FFFFFF}Reset K/D - {FF0099}$2,000,000\n{FFFFFF}Set new skin - {FF0099}$250,000\n{FFFFFF}Name change - {FF0099}$1,500,000\n{FFFFFF}Start vote - {FF0099}$250,000\nFight Style Normal - {FF0099}Free\nFight Style Box - {FF0099}$73,482\nFight Style Kung Fu - {FF0099}$94,631\nFight Style Knee - {FF0099}$58,433", "Select", "Close");
  1323. }
  1324. /* if(checkpointid == bankcashCP)
  1325. {
  1326. new str[956];
  1327. format(str, sizeof str, "Depoist\nWithdraw\nBank Money:%i$", Info[playerid][BankMoney]);
  1328. ShowPlayerDialog(playerid,DIALOG_BANK, DIALOG_STYLE_LIST, "Play-SA Bank", "str", "Select","Cancel");
  1329. }*/
  1330. if(!IsPlayerInAnyVehicle(playerid))
  1331. {
  1332. for(new i; i < MAX_ROBBERIES; i++)
  1333. {
  1334. if(!RobberyData[i][Exists]) continue;
  1335.  
  1336. if(checkpointid == RobberyData[i][Checkpoint])
  1337. {
  1338. SetPVarInt(playerid, "robberyID", i);
  1339.  
  1340. if(!IsPlayerConnected(RobberyData[i][OccupiedBy]) && RobberyData[i][robTimer] == -1)
  1341. {
  1342. new title[64];
  1343. format(title, sizeof(title), "{F1C40F}Robbery: {FFFFFF}%s", RobberyData[i][robName]);
  1344. ShowPlayerDialog(playerid, DIALOG_ROBBERY, DIALOG_STYLE_MSGBOX, title, "Do you want to rob this place?", "Rob", "Close");
  1345. }
  1346. break;
  1347. }
  1348. }
  1349. }//================================BOyka======================================== kona bn45or
  1350. /*if(checkpointid == LotteryCP1)
  1351. {
  1352. new Cache:result, query[94], string[744];
  1353. result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 1 AND `PlayerName` = '-'");
  1354.  
  1355. if(cache_num_rows()) {
  1356.  
  1357. format(query, sizeof query, "{FFFFFF}Lottery for $1,000 with prize $90,000 {FFFF00}%i available tickets\n", cache_num_rows());
  1358. strcat(string, query);
  1359. }
  1360. else strcat(string, "{FFFFFF}Lottery for $1,000 with prize $90,000\n");
  1361.  
  1362. result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 2 AND `PlayerName` = '-'");
  1363.  
  1364. if(cache_num_rows()) {
  1365.  
  1366. format(query, sizeof query, "{FFFFFF}Lottery for $5,000 with prize $45,000 {FFFF00}%i available tickets\n", cache_num_rows());
  1367. strcat(string, query);
  1368. }
  1369. else strcat(string, "{FFFFFF}Lottery for $5,000 with prize $45,000\n");
  1370.  
  1371. result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 3 AND `PlayerName` = '-'");
  1372.  
  1373. if(cache_num_rows()) {
  1374.  
  1375. format(query, sizeof query, "{FFFFFF}Lottery for $10,000 with prize $90,000 {FFFF00}%i available tickets\n", cache_num_rows());
  1376. strcat(string, query);
  1377. }
  1378. else strcat(string, "{FFFFFF}Lottery for $10,000 with prize $90,000\n");
  1379.  
  1380. result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 4 AND `PlayerName` = '-'");
  1381.  
  1382. if(cache_num_rows()) {
  1383.  
  1384. format(query, sizeof query, "{FFFFFF}Lottery for $50,000 with prize $4,500,000 {FFFF00}%i available tickets\n", cache_num_rows());
  1385. strcat(string, query);
  1386. }
  1387. else strcat(string, "{FFFFFF}Lottery for $50,000 with prize $4,500,000\n");
  1388.  
  1389. result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 5 AND `PlayerName` = '-'");
  1390.  
  1391. if(cache_num_rows()) {
  1392.  
  1393. format(query, sizeof query, "{FFFFFF}Lottery for $100,000 with prize $9,000,000 {FFFF00}%i available tickets\n", cache_num_rows());
  1394. strcat(string, query);
  1395. }
  1396. else strcat(string, "{FFFFFF}Lottery for $100,000 with prize $9,000,000\n");
  1397.  
  1398. result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 6 AND `PlayerName` = '-'");
  1399.  
  1400. if(cache_num_rows()) {
  1401.  
  1402. format(query, sizeof query, "{FFFFFF}Lottery for $500,000 with prize $22,500,000 {FFFF00}%i available tickets\n", cache_num_rows());
  1403. strcat(string, query);
  1404. }
  1405. else strcat(string, "{FFFFFF}Lottery for $500,000 with prize $22,500,000\n");
  1406.  
  1407. result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 7 AND `PlayerName` = '-'");
  1408.  
  1409. if(cache_num_rows()) {
  1410.  
  1411. format(query, sizeof query, "{FFFFFF}Lottery for $1,000,000 with prize $45,000,000 {FFFF00}%i available tickets\n", cache_num_rows());
  1412. strcat(string, query);
  1413. }
  1414. else strcat(string, "{FFFFFF}Lottery for $1,000,000 with prize $45,000,000\n");
  1415.  
  1416. cache_delete(result);
  1417.  
  1418. ShowPlayerDialog(playerid, DIALOG_LOTTO, DIALOG_STYLE_LIST, "Lottery", string, "Select", "Close");
  1419. }*/
  1420. if(checkpointid == ThiefPlace)
  1421. {
  1422. if(InJob[playerid] == ThiefF)
  1423. {// Clothes = 50k, Guns = 100k, Food = 70k
  1424.  
  1425. TogglePlayerControllable(playerid, 0);
  1426. SetTimerEx("CheckingThiefF", 5000, 0, "d", playerid);
  1427. GameTextForPlayer(playerid, "~g~Checking The Bag Goods Please Wait", 5000, 5);
  1428. RemovePlayerMapIcon(playerid,69);
  1429. }
  1430. if(InJob[playerid] == ThiefC)
  1431. {
  1432. TogglePlayerControllable(playerid, 0);
  1433. SetTimerEx("CheckingThiefC", 5000, 0, "d", playerid);
  1434. RemovePlayerMapIcon(playerid,69);
  1435. }
  1436. if(InJob[playerid] == ThiefG)
  1437. {
  1438. TogglePlayerControllable(playerid, 0);
  1439. SetTimerEx("CheckingThiefG", 5000, 0, "d", playerid);
  1440. GameTextForPlayer(playerid, "~g~Checking The Bag Goods Please Wait", 5000, 5);
  1441. RemovePlayerMapIcon(playerid,69);
  1442. }
  1443. }
  1444. if(checkpointid == MarketPlace)//xDDD aro7 3la el farmer
  1445. {
  1446. ShowPlayerDialog(playerid, DIALOG_MARKET, DIALOG_STYLE_TABLIST_HEADERS, "Market","Name\tPrice\tProfit\nClothes\t$30,000\t$10,000\nGuns\t$40,000\t$15,000\nFood\t$$20,000\t$5,000\n", "Buy", "Cancel");
  1447. }
  1448. if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && checkpointid == BossCP[playerid])
  1449. {
  1450. if(IsPlayerInRangeOfPoint(playerid, 7.0, -2144.2568,-247.9228,36.5156))
  1451. {
  1452. if(InJob[playerid] == CashC)
  1453. {
  1454. /*Info[playerid][CashCourierSkills]++;
  1455. mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `CashCourierSkills` = %i WHERE `ID` = %i", Info[playerid][CashCourierSkills], Info[playerid][ID]);
  1456. mysql_tquery(mysql, string);*/
  1457. GiveServerMoney(playerid, 10000);
  1458. GameTextForPlayer(playerid, "~g~PAYOUT $10000", 3000, 5);
  1459. TogglePlayerDynamicCP(playerid, BossCP[playerid], 0);
  1460. DestroyDynamicCP(BossCP[playerid]);
  1461. RemovePlayerAttachedObject(playerid,1);
  1462. DestroyActor(ActorBoss[playerid]);
  1463. RemovePlayerMapIcon(playerid, 69);
  1464. InJob[playerid] = NOJOB;
  1465. SetPlayerWantedLevelEx(playerid, GetPlayerWantedLevel(playerid) + 2);
  1466. }
  1467. }
  1468. }
  1469. if(checkpointid == ClothesCP[playerid])
  1470. {
  1471. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 609)
  1472. {
  1473. if(InJob[playerid] == ClothesT)
  1474. {
  1475.  
  1476. TogglePlayerControllable(playerid, 0);
  1477. SetTimerEx("ClothesPayout", 5000, 0, "d", playerid);
  1478. GameTextForPlayer(playerid, "~g~Clearing The Goods Please Wait", 3000, 5);
  1479. DestroyDynamicCP(ClothesCP[playerid]);
  1480. }
  1481. }
  1482. }
  1483. if(checkpointid == GunsCP[playerid])
  1484. {
  1485. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 482)
  1486. {
  1487. if(InJob[playerid] == GunsT)
  1488. {
  1489. TogglePlayerControllable(playerid, 0);
  1490. SetTimerEx("GunsPayout", 5000, 0, "d", playerid);
  1491. GameTextForPlayer(playerid, "~g~Clearing The Goods Please Wait", 5000, 5);//
  1492. DestroyDynamicCP(GunsCP[playerid]);
  1493. }
  1494. }
  1495. }
  1496. if(checkpointid == FoodCP[playerid])
  1497. {
  1498. if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 573)
  1499. {
  1500. if(InJob[playerid] == FoodT)
  1501. {
  1502. TogglePlayerControllable(playerid, 0);
  1503. SetTimerEx("FoodPayout", 5000, 0, "d", playerid);
  1504. GameTextForPlayer(playerid, "~g~Clearing The Goods Please Wait", 5000, 5);
  1505. DestroyDynamicCP(FoodCP[playerid]);
  1506. }
  1507. }
  1508. }
  1509.  
  1510. // =================================================BOyka===============================================
  1511. return 1;
  1512. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement