Guest User

Gang Tester V3.0 - Final Version - Refresh

a guest
Sep 21st, 2019
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <streamer>
  3. //------------------------------------//
  4. #define SPAWN 19980
  5. #define CAPTURE 19981
  6. #define LOOT 19982
  7. #define HOUSE 19983
  8. #define HEALTH 19984
  9. #define ARMOUR 19985
  10. #define MINIGUN 19986
  11. #define ROCKET 19987
  12. #define GATE 19988
  13. #define BASE 19989
  14. #define EDITGANG 19990
  15. #define GANGBASE 19991
  16. #define TELEPORTS 19992
  17. #define VEHICLES 19993
  18. #define TERRITORY 19994
  19. #define INTERIOR 19995
  20. #define NEWS 19996
  21. //------------------------------------//
  22. new tp; // //
  23. new tp1; // //
  24. new tp2; // //
  25. new tp3; // //
  26. new tp4; // //
  27. new tp5; // TELEPORTS //
  28. new tp6; // //
  29. new tp7; // //
  30. new tp8; // //
  31. new tp9; // //
  32. new tp10; // //
  33. new Text3D:ltp; // //
  34. new Text3D:ltp1; // //
  35. new Text3D:ltp2; // //
  36. new Text3D:ltp3; // //
  37. new Text3D:ltp4; // //
  38. new Text3D:ltp5; // TELEPORT //
  39. new Text3D:ltp6; // TEXTS //
  40. new Text3D:ltp7; // //
  41. new Text3D:ltp8; // //
  42. new Text3D:ltp9; // //
  43. new Text3D:ltp10; // //
  44. new teleport0; // Create Teleport Protection #0 //
  45. new teleport1; // Create Teleport Protection #1 //
  46. new teleport2; // Create Teleport Protection #2 //
  47. new teleport3; // Create Teleport Protection #3 //
  48. new teleport4; // Create Teleport Protection #4 //
  49. new teleport5; // Create Teleport Protection #5 //
  50. new teleport6; // Create Teleport Protection #6 //
  51. new teleport7; // Create Teleport Protection #7 //
  52. new teleport8; // Create Teleport Protection #8 //
  53. new teleport9; // Create Teleport Protection #9 //
  54. new teleport10; // Create Teleport Protection #10 //
  55. //--------------------------------------------------------------//
  56. //--------------------------------------------------------------//
  57. new Float:posX; // //
  58. new Float:posY; // //
  59. new Float:posZ; // Gang //
  60. new Float:posA; // Spawn //
  61. new GangSpawn; // //
  62. //--------------------------------------------------------------//
  63. //--------------------------------------------------------------//
  64. new Float:posX0; // //
  65. new Float:posY0; // //
  66. new Float:posZ0; // Teleport //
  67. new Float:posA0; // #0 //
  68. new Teleport0; // //
  69. //--------------------------------------------------------------//
  70. //--------------------------------------------------------------//
  71. new Float:posX1; // //
  72. new Float:posY1; // //
  73. new Float:posZ1; // Teleport //
  74. new Float:posA1; // #1 //
  75. new Teleport1; // //
  76. //--------------------------------------------------------------//
  77. //--------------------------------------------------------------//
  78. new Float:posX2; // //
  79. new Float:posY2; // //
  80. new Float:posZ2; // Teleport //
  81. new Float:posA2; // #2 //
  82. new Teleport2; // //
  83. //--------------------------------------------------------------//
  84. //--------------------------------------------------------------//
  85. new Float:posX3; // //
  86. new Float:posY3; // //
  87. new Float:posZ3; // Teleport //
  88. new Float:posA3; // #3 //
  89. new Teleport3; // //
  90. //--------------------------------------------------------------//
  91. //--------------------------------------------------------------//
  92. new Float:posX4; // //
  93. new Float:posY4; // //
  94. new Float:posZ4; // Teleport //
  95. new Float:posA4; // #4 //
  96. new Teleport4; // //
  97. //--------------------------------------------------------------//
  98. //--------------------------------------------------------------//
  99. new Float:posX5; // //
  100. new Float:posY5; // //
  101. new Float:posZ5; // Teleport //
  102. new Float:posA5; // #5 //
  103. new Teleport5; // //
  104. //--------------------------------------------------------------//
  105. //--------------------------------------------------------------//
  106. new Float:posX6; // //
  107. new Float:posY6; // //
  108. new Float:posZ6; // Teleport //
  109. new Float:posA6; // #6 //
  110. new Teleport6; // //
  111. //--------------------------------------------------------------//
  112. //--------------------------------------------------------------//
  113. new Float:posX7; // //
  114. new Float:posY7; // //
  115. new Float:posZ7; // Teleport //
  116. new Float:posA7; // #7 //
  117. new Teleport7; // //
  118. //--------------------------------------------------------------//
  119. //--------------------------------------------------------------//
  120. new Float:posX8; // //
  121. new Float:posY8; // //
  122. new Float:posZ8; // Teleport //
  123. new Float:posA8; // #8 //
  124. new Teleport8; // //
  125. //--------------------------------------------------------------//
  126. //--------------------------------------------------------------//
  127. new Float:posX9; // //
  128. new Float:posY9; // //
  129. new Float:posZ9; // Teleport //
  130. new Float:posA9; // #9 //
  131. new Teleport9; // //
  132. //--------------------------------------------------------------//
  133. //--------------------------------------------------------------//
  134. new Float:posX10; // //
  135. new Float:posY10; // //
  136. new Float:posZ10; // Teleport //
  137. new Float:posA10; // #10 //
  138. new Teleport10; // //
  139. //--------------------------------------------------------------//
  140. //--------------------------------------------------------------//
  141. new Float:posX11; // //
  142. new Float:posY11; // //
  143. new Float:posZ11; // BASE //
  144. new Float:posA11; // //
  145. new Base; // //
  146. //--------------------------------------------------------------//
  147. //--------------------------------------------------------------//
  148. new Float:posX12; // //
  149. new Float:posY12; // //
  150. new Float:posZ12; // Enter //
  151. new Float:posA12; // Ghouse //
  152. new Enter; // //
  153. //--------------------------------------------------------------//
  154. //--------------------------------------------------------------//
  155. new Float:posX13; // //
  156. new Float:posY13; // //
  157. new Float:posZ13; // Exit //
  158. new Float:posA13; // Ghouse //
  159. new Exit; // //
  160. //--------------------------------------------------------------//
  161. //--------------------------------------------------------------//
  162. new Float:posX14; // //
  163. new Float:posY14; // //
  164. new Float:posZ14; // Explode //
  165. new Float:posA14; // Pickup //
  166. new Planted; // //
  167. //--------------------------------------------------------------//
  168. //--------------------------------------------------------------//
  169. new rtt; // Timer //
  170. new gtt; // Timer //
  171. new gtd; // Gate //
  172. new bomb; // Destroyer //
  173. new Destroyed; // Gate //
  174. new hp; // Health //
  175. new ar; // Pickups //
  176. new mg; // Weapon //
  177. new rk; // Pickups //
  178. new gate; // Gate Creator //
  179. new Text3D:ganggate; // Gate Text //
  180. new Text3D:tehouse; // Gang House //
  181. new Text3D:thouse; // Gang House //
  182. new ghouse; // Pickup //
  183. new Text3D:textloot; // Loot //
  184. new loot; // Pickup //
  185. new capture; // Capture //
  186. new captureicon; // Icon //
  187. new Text3D:capturet; // Pickup //
  188. new capturecp; // Capture //
  189. new capturetimer; // Protection //
  190. new ghouset; // Protection //
  191. new ghousetx; // Protection //
  192. new capturearea, bool:isincapturearea; //Ifplayerisnearthepiokup//
  193. new ghousearea, bool:isinghousearea; //Ifplayerisnearthepiokup//
  194. new eghousearea, bool:isineghousearea; //Ifplayerisnearthepiokup//
  195. //-------------------------------------------------------------------//
  196. //-------------------------------------------------------------------//
  197. new heal_timer[MAX_PLAYERS]; // Heal Pickups //
  198. new armour_timer[MAX_PLAYERS]; // Cooldown //
  199. new minigun_timer[MAX_PLAYERS]; // Weapons Pickups //
  200. new rocket_timer[MAX_PLAYERS]; // Cooldown //
  201. //-------------------------------------------------------------------//
  202. //-------------------------------------------------------------------//
  203. new Makingzone; // //
  204. new Float:ZMinX; // //
  205. new Float:ZMaxX; // //
  206. new Float:ZMinY; // Create //
  207. new Float:ZMaxY; // Territory //
  208. new GangZone; // //
  209. new Create; // //
  210. new Tprotection; // //
  211. //------------------------------------------------------------------//
  212. //------------------------------------------------------------------//
  213. public OnFilterScriptExit()
  214. {
  215. GangZoneHideForAll(GangZone);
  216. return 1;
  217. }
  218. public OnPlayerSpawn(playerid)
  219. {
  220. if(GangSpawn == 0) SetPlayerPos(playerid,-2226.6367, 95.9487, 1036.0600),SetPlayerInterior(playerid, 1),SetPlayerFacingAngle(playerid, 1),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid, 0);
  221. if(GangSpawn == 1) SetPlayerPos(playerid, posX, posY, posZ+0.10),SetPlayerFacingAngle(playerid, posA),SetPlayerInterior(playerid, 1),SetCameraBehindPlayer(playerid),ResetPlayerWeapons(playerid),GivePlayerWeapon(playerid,9,1),GivePlayerWeapon(playerid,24,6000),GivePlayerWeapon(playerid,26,6000),GivePlayerWeapon(playerid,32,6000),GivePlayerWeapon(playerid,31,6000),GivePlayerWeapon(playerid,34,6000);
  222. return 1;
  223. }
  224. public OnPlayerCommandText(playerid, cmdtext[])
  225. {
  226. if (strcmp("/editgang", cmdtext, true, 10) == 0)
  227. {
  228. if(IsPlayerAdmin(playerid))
  229. {
  230. ShowPlayerDialog(playerid, EDITGANG ,DIALOG_STYLE_LIST,"{FF0000}EDIT GANG {FFFFFF}panel","{FF0000}Set Spawn\n{FF0000}Set Capture\n{FF0000}Set Gang House\n{FF0000}Set Base\n{FF0000}Set Loot\n{FF0000}Set Health\n{FF0000}Set Armour\n{FF0000}Set Minigun\n{FF0000}Set Rocket\n{FF0000}Remove Vehicles\n{FF0000}Set Vehicle\n{FF0000}Remove Teleports\n{FF0000}Set Teleport\n{FF0000}Set Territory\n{FF0000}Reload Gate","Select","Close");
  231. }
  232. else
  233. {
  234. }
  235. return 1;
  236. }
  237. if (strcmp("/base", cmdtext, true, 10) == 0)
  238. {
  239. ShowPlayerDialog(playerid, GANGBASE ,DIALOG_STYLE_LIST,"Base Teleports","{FFFF00}Gang Tester V3.0","Teleport","Close");
  240. return 1;
  241. }
  242. if (strcmp("/gtloc 0", cmdtext, true, 10) == 0)
  243. {
  244. if(IsPlayerAdmin(playerid))
  245. {
  246. new string[128];
  247. if(Teleport0 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  248. GetPlayerPos(playerid, posX0, posY0, posZ0),GetPlayerFacingAngle(playerid, posA1);
  249. Teleport0 = 1;
  250. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  251. }
  252. else
  253. {
  254. }
  255. return 1;
  256. }
  257. if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
  258. {
  259. if(IsPlayerAdmin(playerid))
  260. {
  261. new string[128];
  262. if(Teleport1 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  263. GetPlayerPos(playerid, posX1, posY1, posZ1),GetPlayerFacingAngle(playerid, posA1);
  264. Teleport1 = 1;
  265. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  266. }
  267. else
  268. {
  269. }
  270. return 1;
  271. }
  272. if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
  273. {
  274. if(IsPlayerAdmin(playerid))
  275. {
  276. new string[128];
  277. if(Teleport2 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  278. GetPlayerPos(playerid, posX2, posY2, posZ2),GetPlayerFacingAngle(playerid, posA2);
  279. Teleport2 = 1;
  280. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  281. }
  282. else
  283. {
  284. }
  285. return 1;
  286. }
  287. if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
  288. {
  289. if(IsPlayerAdmin(playerid))
  290. {
  291. new string[128];
  292. if(Teleport3 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  293. GetPlayerPos(playerid, posX3, posY3, posZ3),GetPlayerFacingAngle(playerid, posA3);
  294. Teleport3 = 1;
  295. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  296. }
  297. else
  298. {
  299. }
  300. return 1;
  301. }
  302. if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
  303. {
  304. if(IsPlayerAdmin(playerid))
  305. {
  306. new string[128];
  307. if(Teleport4 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  308. GetPlayerPos(playerid, posX4, posY4, posZ4),GetPlayerFacingAngle(playerid, posA4);
  309. Teleport4 = 1;
  310. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  311. }
  312. else
  313. {
  314. }
  315. return 1;
  316. }
  317. if (strcmp("/gtloc 5", cmdtext, true, 10) == 0)
  318. {
  319. if(IsPlayerAdmin(playerid))
  320. {
  321. new string[128];
  322. if(Teleport5 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  323. GetPlayerPos(playerid, posX5, posY5, posZ5),GetPlayerFacingAngle(playerid, posA5);
  324. Teleport5 = 1;
  325. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  326. }
  327. else
  328. {
  329. }
  330. return 1;
  331. }
  332. if (strcmp("/gtloc 6", cmdtext, true, 10) == 0)
  333. {
  334. if(IsPlayerAdmin(playerid))
  335. {
  336. new string[128];
  337. if(Teleport6 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  338. GetPlayerPos(playerid, posX6, posY6, posZ6),GetPlayerFacingAngle(playerid, posA6);
  339. Teleport6 = 1;
  340. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  341. }
  342. else
  343. {
  344. }
  345. return 1;
  346. }
  347. if (strcmp("/gtloc 7", cmdtext, true, 10) == 0)
  348. {
  349. if(IsPlayerAdmin(playerid))
  350. {
  351. new string[128];
  352. if(Teleport7 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  353. SetPlayerPos(playerid, posX7, posY7, posZ7),GetPlayerFacingAngle(playerid, posA7);
  354. Teleport7 = 1;
  355. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  356. }
  357. else
  358. {
  359. }
  360. return 1;
  361. }
  362. if (strcmp("/gtloc 8", cmdtext, true, 10) == 0)
  363. {
  364. if(IsPlayerAdmin(playerid))
  365. {
  366. new string[128];
  367. if(Teleport8 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  368. GetPlayerPos(playerid, posX8, posY8, posZ8),GetPlayerFacingAngle(playerid, posA8);
  369. Teleport8 = 1;
  370. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  371. }
  372. else
  373. {
  374. }
  375. return 1;
  376. }
  377. if (strcmp("/gtloc 9", cmdtext, true, 10) == 0)
  378. {
  379. if(IsPlayerAdmin(playerid))
  380. {
  381. new string[128];
  382. if(Teleport9 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  383. GetPlayerPos(playerid, posX9, posY9, posZ9),GetPlayerFacingAngle(playerid, posA9);
  384. Teleport9 = 1;
  385. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  386. }
  387. else
  388. {
  389. }
  390. return 1;
  391. }
  392. if (strcmp("/gtloc 10", cmdtext, true, 10) == 0)
  393. {
  394. if(IsPlayerAdmin(playerid))
  395. {
  396. new string[128];
  397. if(Teleport10 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  398. GetPlayerPos(playerid, posX10, posY10, posZ10),GetPlayerFacingAngle(playerid, posA10);
  399. Teleport10 = 1;
  400. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  401. }
  402. else
  403. {
  404. }
  405. return 1;
  406. }
  407. if(strcmp("/capture", cmdtext, true, 10) == 0)
  408. {
  409. if(isincapturearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the capture pickup!");
  410. {
  411. new name[24], string[64], string1[64];
  412. new Float:x, Float:y, Float:z;
  413. GetPlayerPos(playerid, x, y, z);
  414. GetPlayerName( playerid, name, 24 );
  415. GangZoneFlashForAll(GangZone,0xFF0000FF);
  416. captureicon = CreateDynamicMapIcon(x, y, z, 61, -1, -1, -1, -1, 25, MAPICON_LOCAL, -1, 0);
  417. capturecp = CreateDynamicCP(x, y, z-0.90, 8, -1, -1, -1, 25, -1, 0);
  418. format(string, sizeof(string), "~r~Capture started ~n~~y~by ~b~%s", name,GetPlayerColor(playerid));
  419. GameTextForAll(string, 5000, 3);
  420. format(string1,sizeof(string1), "Capturing by: {005AFF}%s", name);
  421. UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, string1);
  422. capturetimer = SetTimer("captured",10000,false);
  423. }
  424. return 1;
  425. }
  426. if(strcmp("/blowgate", cmdtext, true, 10) == 0)
  427. {
  428. /*You have to manualy update gate location once you add a new one everytime*/
  429. if(Destroyed == 0)
  430. if(IsPlayerInRangeOfPoint(playerid, 10.0, 2427.0598, 1705.9030, 12.4857))
  431. {
  432. GameTextForPlayer(playerid, "~g~~h~Planting!", 5000, 3);
  433. gtt = SetTimer("gatetimer",10000,false);
  434. }
  435. return 1;
  436. }
  437. if(strcmp("/repairgate", cmdtext, true, 10) == 0)
  438. {
  439. /*You have to manualy update gate location once you add a new one everytime*/
  440. if(IsPlayerInRangeOfPoint(playerid, 10.0, 2427.0598, 1705.9030, 12.4857))
  441. if(Destroyed == 1)
  442. {
  443. GameTextForPlayer(playerid, "~g~~h~Repairing!", 5000, 3);
  444. rtt = SetTimer("gatertimer",10000,false);
  445. }
  446. return 1;
  447. }
  448. if(strcmp("/enter", cmdtext, true, 10) == 0)
  449. {
  450. if(isinghousearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the gang house!");
  451. if(Enter == 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang House Interior not set!");
  452. {
  453. SetPlayerPos(playerid, posX12, posY12, posZ12),SetPlayerFacingAngle(playerid, posA12),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,1),SetPlayerVirtualWorld(playerid, 1);
  454. }
  455. return 1;
  456. }
  457. if(strcmp("/exit", cmdtext, true, 10) == 0)
  458. {
  459. if(isineghousearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the gang house!");
  460. if(Exit == 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang House is not created!");
  461. {
  462. SetPlayerPos(playerid, posX13, posY13, posZ13),SetPlayerFacingAngle(playerid, posA13),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0),SetPlayerVirtualWorld(playerid, 0);
  463. }
  464. return 1;
  465. }
  466. ////////////////////////////////////////////////////////////////////////////////
  467. // You have to manualy update gate direction once you add a new one everytime //
  468. ////////////////////////////////////////////////////////////////////////////////
  469. if(strcmp("/opengate", cmdtext, true, 10) == 0)
  470. {
  471. if(Destroyed == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
  472. if(IsPlayerInRangeOfPoint(playerid, 15, 2427.0598, 1705.9030, 12.4857))
  473. {
  474. MoveDynamicObject(gate, 2427.0598, 1705.9030, 6.9587, 3, 0.0000, 0.0000, 0.0000);
  475. }
  476. else
  477. {
  478. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
  479. }
  480. return 1;
  481. }
  482. if(Destroyed == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
  483. if(strcmp("/closegate", cmdtext, true, 10) == 0)
  484. {
  485. if(IsPlayerInRangeOfPoint(playerid, 15, 2427.0598, 1705.9030, 12.4857))
  486. {
  487. MoveDynamicObject(gate, 2427.0598, 1705.9030, 12.4857, 3, 0.0000, 0.0000, 0.0000);
  488. }
  489. else
  490. {
  491. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
  492. }
  493. return 1;
  494. }
  495. if(strcmp("/og", cmdtext, true, 10) == 0)
  496. {
  497. if(Destroyed == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
  498. if(IsPlayerInRangeOfPoint(playerid, 15, 2427.0598, 1705.9030, 12.4857))
  499. {
  500. MoveDynamicObject(gate, 2427.0598, 1705.9030, 6.9587, 3, 0.0000, 0.0000, 0.0000);
  501. }
  502. else
  503. {
  504. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
  505. }
  506. return 1;
  507. }
  508. if(strcmp("/cg", cmdtext, true, 10) == 0)
  509. {
  510. if(Destroyed == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
  511. if(IsPlayerInRangeOfPoint(playerid, 15, 2427.0598, 1705.9030, 12.4857))
  512. {
  513. MoveDynamicObject(gate, 2427.0598, 1705.9030, 12.4857, 3, 0.0000, 0.0000, 0.0000);
  514. }
  515. else
  516. {
  517. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
  518. }
  519. return 1;
  520. }
  521. ////////////////////////////////////////////////////////////////////////////////
  522. // You have to manualy update gate direction once you add a new one everytime //
  523. ////////////////////////////////////////////////////////////////////////////////
  524. return 0;
  525. }
  526. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  527. {
  528. if(pickupid == hp)
  529. {
  530. if(heal_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can heal only once every 30 seconds!");
  531. SetPlayerHealth(playerid,100),GameTextForPlayer(playerid, "~r~~h~Hp Filled", 2500, 3),heal_timer[playerid] = SetTimer("heal",30000,true);
  532. }
  533. if(pickupid == ar)
  534. {
  535. if(armour_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can heal only once every 30 seconds!");
  536. SetPlayerArmour(playerid,100),GameTextForPlayer(playerid, "~b~~h~Armour Filled", 2500, 3),armour_timer[playerid] = SetTimer("armour",30000,true);
  537. }
  538. if(pickupid == mg)
  539. {
  540. if(minigun_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can load this gun only once every 1 minute!");
  541. GivePlayerWeapon(playerid, 38, 50),GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3),minigun_timer[playerid] = SetTimer("minigun",60000,true);
  542. }
  543. if(pickupid == rk)
  544. {
  545. if(rocket_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can load this gun only once every 1 minute!");
  546. GivePlayerWeapon(playerid, 35, 10),GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3),rocket_timer[playerid] = SetTimer("rocket",60000,true);
  547. }
  548. if(pickupid == ghouse)
  549. {
  550. }
  551. if(pickupid == loot)
  552. {
  553. }
  554. if(pickupid == capture)
  555. {
  556. }
  557. return 1;
  558. }
  559. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  560. {
  561. if(checkpointid == tp)
  562. {
  563. if(Teleport0 == 1)SetPlayerPos(playerid, posX0, posY0, posZ0),SetPlayerFacingAngle(playerid, posA0),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  564. }
  565. if(checkpointid == tp1)
  566. {
  567. if(Teleport1 == 1) SetPlayerPos(playerid, posX1, posY1, posZ1),SetPlayerFacingAngle(playerid, posA1),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  568. }
  569. if(checkpointid == tp2)
  570. {
  571. if(Teleport2 == 1)SetPlayerPos(playerid, posX2, posY2, posZ2),SetPlayerFacingAngle(playerid, posA2),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  572. }
  573. if(checkpointid == tp3)
  574. {
  575. if(Teleport3 == 1)SetPlayerPos(playerid, posX3, posY3, posZ3),SetPlayerFacingAngle(playerid, posA3),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  576. }
  577. if(checkpointid == tp4)
  578. {
  579. if(Teleport4 == 1)SetPlayerPos(playerid, posX4, posY4, posZ4),SetPlayerFacingAngle(playerid, posA4),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  580. }
  581. if(checkpointid == tp5)
  582. {
  583. if(Teleport5 == 1)SetPlayerPos(playerid, posX5, posY5, posZ5),SetPlayerFacingAngle(playerid, posA5),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  584. }
  585. if(checkpointid == tp6)
  586. {
  587. if(Teleport6 == 1)SetPlayerPos(playerid, posX6, posY6, posZ6),SetPlayerFacingAngle(playerid, posA6),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  588. }
  589. if(checkpointid == tp7)
  590. {
  591. if(Teleport7 == 1)SetPlayerPos(playerid, posX7, posY7, posZ7),SetPlayerFacingAngle(playerid, posA7),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  592. }
  593. if(checkpointid == tp8)
  594. {
  595. if(Teleport8 == 1)SetPlayerPos(playerid, posX8, posY8, posZ8),SetPlayerFacingAngle(playerid, posA8),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  596. }
  597. if(checkpointid == tp9)
  598. {
  599. if(Teleport9 == 1)SetPlayerPos(playerid, posX9, posY9, posZ9),SetPlayerFacingAngle(playerid, posA9),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  600. }
  601. if(checkpointid == tp10)
  602. {
  603. if(Teleport10 == 1)SetPlayerPos(playerid, posX10, posY10, posZ10),SetPlayerFacingAngle(playerid, posA10),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  604. }
  605. if(checkpointid == capturecp)
  606. {
  607. }
  608. return 1;
  609. }
  610.  
  611. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  612. {
  613. if(dialogid == SPAWN)// Save Spawn //
  614. {
  615. if(response)
  616. {
  617. if(listitem == 0)//SET SPAWN
  618. {
  619. GetPlayerPos(playerid, posX, posY, posZ),GetPlayerFacingAngle(playerid, posA),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn saved!"),GangSpawn = 1;
  620. }
  621. if(listitem == 1)//RESET SPAWN
  622. {
  623. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn reset!"),GangSpawn = 0;
  624. }
  625. }
  626. return 1;
  627. }
  628. if(dialogid == CAPTURE)// Set Capture //
  629. {
  630. if(response)
  631. {
  632. if(listitem == 0)//SET CAPTURE
  633. {
  634. DestroyDynamicPickup(capture);
  635. DestroyDynamic3DTextLabel(capturet);
  636. DestroyDynamicArea(capturearea);
  637. new Float:x, Float:y, Float:z;
  638. GetPlayerPos(playerid, x, y, z);
  639. capture = CreateDynamicPickup(1314, 1, x, y, z, -1);
  640. capturet = CreateDynamic3DTextLabel("{FF0000}/capture", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  641. capturearea = CreateDynamicCircle(x, y, 0.50, -1, -1, -1);
  642. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture saved!");
  643. }
  644. if(listitem == 1)//DESTROY CAPTURE
  645. {
  646. DestroyDynamicPickup(capture);
  647. DestroyDynamic3DTextLabel(capturet);
  648. DestroyDynamicArea(capturearea);
  649. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture destroyed!");
  650. }
  651. }
  652. return 1;
  653. }
  654. if(dialogid == HOUSE)// Set House //
  655. {
  656. if(response)
  657. {
  658. if(listitem == 0)//SET HOUSE
  659. {
  660. DestroyDynamicPickup(ghouse);
  661. DestroyDynamic3DTextLabel(thouse);
  662. new Float:x, Float:y, Float:z;
  663. GetPlayerPos(playerid, x, y, z);
  664. ghouse = CreateDynamicPickup(1239, 1, x, y, z, -1);
  665. ghousearea = CreateDynamicCircle(x, y, 0.50, -1, -1, -1);
  666. GetPlayerPos(playerid, posX13, posY13, posZ13),GetPlayerFacingAngle(playerid, posA13),Exit = 1;
  667. thouse = CreateDynamic3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  668. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House saved!");
  669. }
  670. if(listitem == 1)//DESTROY HOUSE
  671. {
  672. DestroyDynamicPickup(ghouse);
  673. DestroyDynamic3DTextLabel(thouse);
  674. DestroyDynamicArea(eghousearea);
  675. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House destroyed!");
  676. }
  677. if(listitem == 2)//SET EXIT HOUSE
  678. {
  679. DestroyDynamic3DTextLabel(tehouse);
  680. new Float:x, Float:y, Float:z;
  681. GetPlayerPos(playerid, x, y, z);
  682. GetPlayerPos(playerid, posX12, posY12, posZ12),Enter = 1;
  683. eghousearea = CreateDynamicCircle(x, y, 0.50, -1, -1, -1);
  684. tehouse = CreateDynamic3DTextLabel("Type {FFCC00}/exit {FFFFFF}to exit\nfrom this gang house!", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  685. GetPlayerInterior(playerid);
  686. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House Exit saved!");
  687. }
  688. if(listitem == 3)//DESTROY HOUSE EXIT
  689. {
  690. DestroyDynamic3DTextLabel(tehouse);
  691. DestroyDynamicArea(ghousearea);
  692. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House Exit destroyed!");
  693. }
  694. if(listitem == 4)//SELLECT HOUSE INTERIOR
  695. {
  696. ShowPlayerDialog(playerid, INTERIOR ,DIALOG_STYLE_LIST,"{FF0000}Select Interior","{FF0000}Woozie's office\n{FF0000}Victim\n{FF0000}Club\n{FF0000}Sherman dam\n{FF0000}Madd Doggs mansion","Select","Close");
  697. }
  698. }
  699. return 1;
  700. }
  701. if(dialogid == INTERIOR)// Select Interior //
  702. {
  703. if(response)
  704. {
  705. if(listitem == 0)//Woozie's office
  706. {
  707. SetPlayerPos(playerid,-2158.8984,642.8244,1052.3750);
  708. SetPlayerInterior(playerid,1);
  709. }
  710. if(listitem == 1)//Victim
  711. {
  712. SetPlayerPos(playerid,226.1991,-8.2929,1002.2109);
  713. SetPlayerInterior(playerid,5);
  714. }
  715. if(listitem == 2)//Club
  716. {
  717. SetPlayerPos(playerid,493.4003,-24.0426,1000.679);
  718. SetPlayerInterior(playerid,17);
  719. }
  720. if(listitem == 3)//Sherman dam
  721. {
  722. SetPlayerPos(playerid,-959.8879,1955.1631,9.0000);
  723. SetPlayerInterior(playerid,17);
  724. }
  725. if(listitem == 4)//Sherman dam
  726. {
  727. SetPlayerPos(playerid,1267.663208,-781.323242,1091.906250);
  728. SetPlayerInterior(playerid,5);
  729. }
  730. }
  731. return 1;
  732. }
  733. if(dialogid == BASE)// Set Base //
  734. {
  735. if(response)
  736. {
  737. if(listitem == 0)//SET BASE
  738. {
  739. GetPlayerPos(playerid, posX11, posY11, posZ11),GetPlayerFacingAngle(playerid, posA11),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Base saved!"),Base = 1;
  740. }
  741. if(listitem == 1)//RESET BASE
  742. {
  743. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Base reset!"),Base = 0;
  744. }
  745. }
  746. return 1;
  747. }
  748. if(dialogid == LOOT)// Set Loot //
  749. {
  750. if(response)
  751. {
  752. if(listitem == 0)//SET LOOT
  753. {
  754. DestroyDynamicPickup(loot);
  755. DestroyDynamic3DTextLabel(textloot);
  756. new Float:x, Float:y, Float:z;
  757. GetPlayerPos(playerid, x, y, z);
  758. loot = CreateDynamicPickup(1550, 1, x, y, z, -1);
  759. textloot = CreateDynamic3DTextLabel("{CC9900}Gang Loot \n{FFFFFF}Money: {FF0000}999999999{FFFFFF}, Coins: {FF0000}123456789{FFFFFF}, Gems: {FF0000}1337\n{FFFFFF}/loot", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  760. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Loot saved!");
  761. }
  762. if(listitem == 1)//DESTROY LOOT
  763. {
  764. DestroyDynamicPickup(loot);
  765. DestroyDynamic3DTextLabel(textloot);
  766. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Loot destroyed!");
  767. }
  768. }
  769. return 1;
  770. }
  771. if(dialogid == HEALTH)// Set Health //
  772. {
  773. if(response)
  774. {
  775. if(listitem == 0)//SET HEALTH
  776. {
  777. DestroyDynamicPickup(hp);
  778. new Float:x, Float:y, Float:z;
  779. GetPlayerPos(playerid, x, y, z);
  780. hp = CreateDynamicPickup(1240, 1, x, y, z, 0);
  781. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Health saved!");
  782. }
  783. if(listitem == 1)//DESTROY HEALTH
  784. {
  785. DestroyDynamicPickup(hp);
  786. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Health destroyed!");
  787. }
  788. }
  789. return 1;
  790. }
  791. if(dialogid == ARMOUR)// Set Armour //
  792. {
  793. if(response)
  794. {
  795. if(listitem == 0)//SET ARMOUR
  796. {
  797. DestroyDynamicPickup(ar);
  798. new Float:x, Float:y, Float:z;
  799. GetPlayerPos(playerid, x, y, z);
  800. ar = CreateDynamicPickup(1242, 1, x, y, z, 0);
  801. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Armour saved!");
  802. }
  803. if(listitem == 1)//DESTROY ARMOUR
  804. {
  805. DestroyDynamicPickup(ar);
  806. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Armour destroyed!");
  807. }
  808. }
  809. return 1;
  810. }
  811. if(dialogid == MINIGUN)// Set Minigun //
  812. {
  813. if(response)
  814. {
  815. if(listitem == 0)//SET MINIGUN
  816. {
  817. DestroyDynamicPickup(mg);
  818. new Float:x, Float:y, Float:z;
  819. GetPlayerPos(playerid, x, y, z);
  820. mg = CreateDynamicPickup(362, 1, x, y, z, -1);
  821. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Minigun saved!");
  822. }
  823. if(listitem == 1)//DESTROY MINIGUN
  824. {
  825. DestroyDynamicPickup(mg);
  826. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Minigun destroyed!");
  827. }
  828. }
  829. return 1;
  830. }
  831. if(dialogid == ROCKET)// Set Rocket //
  832. {
  833. if(response)
  834. {
  835. if(listitem == 0)//SET MINIGUN
  836. {
  837. DestroyDynamicPickup(rk);
  838. new Float:x, Float:y, Float:z;
  839. GetPlayerPos(playerid, x, y, z);
  840. rk = CreateDynamicPickup(359, 1, x, y, z, -1);
  841. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Rocket saved!");
  842. }
  843. if(listitem == 1)//DESTROY MINIGUN
  844. {
  845. DestroyDynamicPickup(rk);
  846. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Rocket destroyed!");
  847. }
  848. }
  849. return 1;
  850. }
  851. if(dialogid == GATE)// Reload Gate //
  852. {
  853. if(response)
  854. {
  855. if(listitem == 0)//RELOAD GATE
  856. {
  857. //SendClientMessage(playerid, 0xFF0000FF, "ERROR: There is no gate loaded!");
  858. DestroyDynamicObject(gate);
  859. DestroyDynamic3DTextLabel(ganggate);
  860. ganggate = CreateDynamic3DTextLabel("If you are in this gang use {FFFF00}/opengate(/og) {FFFFFF}to open gate \nand {FFFF00}/closegate(/cg) {FFFFFF}to close gate! \n{FF0000}/Blowgate", -1, 2427.0598, 1705.9030, 12.4857, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 0);
  861. gate = CreateDynamicObject(980, 2427.0598, 1705.9030, 12.4857, 0.00, 0.00, 0.00);
  862. SendClientMessage(playerid, 0x00CC3300, "SUCCES: Gate reloaded & teleported!");
  863. SetPlayerPos(playerid,2427.0601+1, 1703.8400+1, 12.4820);
  864. //Teleport player near gate, just added +1 to x & y , no need at z//
  865. }
  866. if(listitem == 1)//DESTROY GATE
  867. {
  868. DestroyDynamicObject(gate);
  869. DestroyDynamic3DTextLabel(ganggate);
  870. SendClientMessage(playerid, 0x00CC3300, "SUCCES: Gate destroyed!");
  871. }
  872. }
  873. return 1;
  874. }
  875. if(dialogid == EDITGANG)
  876. {
  877. if(response)
  878. {
  879. if(listitem == 0)//GANG SPAWN
  880. {
  881. ShowPlayerDialog(playerid, SPAWN ,DIALOG_STYLE_LIST,"{FF0000}Set Spawn","{FF0000}Set Spawn\n{FF0000}Reset Spawn","Select","Close");
  882. }
  883. if(listitem == 1)//GANG CAPTURE
  884. {
  885. ShowPlayerDialog(playerid, CAPTURE ,DIALOG_STYLE_LIST,"{FF0000}Set Capture","{FF0000}Set Capture\n{FF0000}Destroy Capture","Select","Close");
  886. }
  887. if(listitem == 2)//GANG HOUSE
  888. {
  889. ShowPlayerDialog(playerid, HOUSE ,DIALOG_STYLE_LIST,"{FF0000}Set Gang House","{FF0000}Set Gang House\n{FF0000}Destroy Gang House\n{FF0000}Set Gang House Exit\n{FF0000}Destroy Gang House Exit\n{00FF00}Select Interior","Select","Close");
  890. }
  891. if(listitem == 3)//GANG BASE
  892. {
  893. ShowPlayerDialog(playerid, BASE ,DIALOG_STYLE_LIST,"{FF0000}Set Base","{FF0000}Set Base\n{FF0000}Reset Base","Select","Close");
  894. }
  895. if(listitem == 4)//GANG LOOT
  896. {
  897. ShowPlayerDialog(playerid, LOOT ,DIALOG_STYLE_LIST,"{FF0000}Set Loot","{FF0000}Set Loot\n{FF0000}Destroy Loot","Select","Close");
  898. }
  899. if(listitem == 5)//GANG HEALTH
  900. {
  901. ShowPlayerDialog(playerid, HEALTH ,DIALOG_STYLE_LIST,"{FF0000}Set Health","{FF0000}Set Health\n{FF0000}Destroy Health","Select","Close");
  902. }
  903. if(listitem == 6)//GANG ARMOUR
  904. {
  905. ShowPlayerDialog(playerid, ARMOUR ,DIALOG_STYLE_LIST,"{FF0000}Set Armour","{FF0000}Set Armour\n{FF0000}Destroy Armour","Select","Close");
  906. }
  907. if(listitem == 7)//GANG MINIGUN
  908. {
  909. ShowPlayerDialog(playerid, MINIGUN ,DIALOG_STYLE_LIST,"{FF0000}Set Minigun","{FF0000}Set Minigun\n{FF0000}Destroy Minigun","Select","Close");
  910. }
  911. if(listitem == 8)//GANG ROCKET
  912. {
  913. ShowPlayerDialog(playerid, ROCKET ,DIALOG_STYLE_LIST,"{FF0000}Set Rocket","{FF0000}Set Rocket\n{FF0000}Destroy Rocket","Select","Close");
  914. }
  915. if(listitem == 9)//REMOVE VEHICLES
  916. {
  917. DestroyNearbyVehicles(playerid, 200);
  918. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Vehicles removed!");
  919. }
  920. if(listitem == 10)//SET VEHICLES
  921. {
  922. if(IsPlayerInAnyVehicle(playerid))
  923. {
  924. ShowPlayerDialog(playerid, VEHICLES, DIALOG_STYLE_INPUT ,"{FF0000}Set Vehicle","Insert vehicle color bellow\n{FFFFFF}Example. carcolor1{FF0000}[colorid], {FFFFFF}carcolor2{FF0000}[colorid]","Create","Close");
  925. }
  926. else
  927. {
  928. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not in a vehicle");
  929. }
  930. }
  931. if(listitem == 11)//REMOVE TELEPORTS
  932. {
  933. DestroyDynamicCP(tp);
  934. DestroyDynamicCP(tp1);
  935. DestroyDynamicCP(tp2);
  936. DestroyDynamicCP(tp3);
  937. DestroyDynamicCP(tp4);
  938. DestroyDynamicCP(tp5);
  939. DestroyDynamicCP(tp6);
  940. DestroyDynamicCP(tp7);
  941. DestroyDynamicCP(tp8);
  942. DestroyDynamicCP(tp9);
  943. DestroyDynamicCP(tp10);
  944. DestroyDynamic3DTextLabel(ltp);
  945. DestroyDynamic3DTextLabel(ltp1);
  946. DestroyDynamic3DTextLabel(ltp2);
  947. DestroyDynamic3DTextLabel(ltp3);
  948. DestroyDynamic3DTextLabel(ltp4);
  949. DestroyDynamic3DTextLabel(ltp5);
  950. DestroyDynamic3DTextLabel(ltp6);
  951. DestroyDynamic3DTextLabel(ltp7);
  952. DestroyDynamic3DTextLabel(ltp8);
  953. DestroyDynamic3DTextLabel(ltp9);
  954. DestroyDynamic3DTextLabel(ltp10);
  955. teleport0 = 0;
  956. teleport1 = 0;
  957. teleport2 = 0;
  958. teleport3 = 0;
  959. teleport4 = 0;
  960. teleport5 = 0;
  961. teleport6 = 0;
  962. teleport7 = 0;
  963. teleport8 = 0;
  964. teleport9 = 0;
  965. teleport10 = 0;
  966. Teleport0 = 0;
  967. Teleport1 = 0;
  968. Teleport2 = 0;
  969. Teleport3 = 0;
  970. Teleport4 = 0;
  971. Teleport5 = 0;
  972. Teleport6 = 0;
  973. Teleport7 = 0;
  974. Teleport8 = 0;
  975. Teleport9 = 0;
  976. Teleport10 = 0;
  977. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleports removed!");
  978. }
  979. if(listitem == 12)//SET TELEPORTS
  980. {
  981. ShowPlayerDialog(playerid, TELEPORTS ,DIALOG_STYLE_LIST ,"{FF0000}Set Teleport","{FF0000}#0\n{FF0000}#1\n{FF0000}#2\n{FF0000}#3\n{FF0000}#4\n{FF0000}#5\n{FF0000}#6\n{FF0000}#7\n{FF0000}#8\n{FF0000}#9\n{FF0000}#10","Create","Close");
  982. }
  983. if(listitem == 13)//SET TERRITORY
  984. {
  985. ShowPlayerDialog(playerid, TERRITORY, 2,"{FF0000}Set Territory List","{FF0000}Create Territory\n{FF0000}Save Territory\n{FF0000}Destroy Territory","Select","Cancel");
  986. return 1;
  987. }
  988. if(listitem == 14)//RELOAD GATE
  989. {
  990. ShowPlayerDialog(playerid, GATE ,DIALOG_STYLE_LIST,"{FF0000}Set Gate","{FF0000}Reload Gate\n{FF0000}Destroy Gate","Select","Close");
  991. }
  992. }
  993. return 1;
  994. }
  995. if(dialogid == GANGBASE)// Save Base Teleport //
  996. {
  997. if(response)
  998. {
  999. if(Base == 1)
  1000. {
  1001. SetPlayerPos(playerid, posX11, posY11, posZ11),SetPlayerFacingAngle(playerid, posA11),SetPlayerInterior(playerid, 0),SetCameraBehindPlayer(playerid),GameTextForPlayer(playerid,"~g~~h~Teleported",2000,3);
  1002. }
  1003. else
  1004. {
  1005. SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Base is not saved!");
  1006. }
  1007. }
  1008. return 1;
  1009. }
  1010. if(dialogid == 1010)// Create Teleport #0 //
  1011. {
  1012. if(response)
  1013. {
  1014. if(teleport0 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1015. new Float:x,Float:y,Float:z;
  1016. GetPlayerPos(playerid,x,y,z);
  1017. tp = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 25, -1, 0);
  1018. ltp = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1019. UpdateDynamic3DTextLabelText(ltp, -1, inputtext);
  1020. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 0 to save teleport direction!");
  1021. teleport0 = 1;
  1022. }
  1023. return 1;
  1024. }
  1025. if(dialogid == 1011)// Create Teleport #1 //
  1026. {
  1027. if(response)
  1028. {
  1029. if(teleport1 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1030. new Float:x,Float:y,Float:z;
  1031. GetPlayerPos(playerid,x,y,z);
  1032. tp1 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 25, -1, 0);
  1033. ltp1 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1034. UpdateDynamic3DTextLabelText(ltp1, -1, inputtext);
  1035. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 1 to save teleport direction!");
  1036. teleport1 = 1;
  1037. }
  1038. return 1;
  1039. }
  1040. if(dialogid == 1012)// Create Teleport #2 //
  1041. {
  1042. if(response)
  1043. {
  1044. if(teleport2 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1045. new Float:x,Float:y,Float:z;
  1046. GetPlayerPos(playerid,x,y,z);
  1047. tp2 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1048. ltp2 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1049. UpdateDynamic3DTextLabelText(ltp2, -1, inputtext);
  1050. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 2 to save teleport direction!");
  1051. teleport2 = 1;
  1052. }
  1053. return 1;
  1054. }
  1055. if(dialogid == 1013)// Create Teleport #3 //
  1056. {
  1057. if(response)
  1058. {
  1059. if(teleport3 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1060. new Float:x,Float:y,Float:z;
  1061. GetPlayerPos(playerid,x,y,z);
  1062. tp3 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1063. ltp3 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1064. UpdateDynamic3DTextLabelText(ltp3, -1, inputtext);
  1065. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 3 to save teleport direction!");
  1066. teleport3 = 1;
  1067. }
  1068. return 1;
  1069. }
  1070. if(dialogid == 1014)// Create Teleport #4 //
  1071. {
  1072. if(response)
  1073. {
  1074. if(teleport4 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1075. new Float:x,Float:y,Float:z;
  1076. GetPlayerPos(playerid,x,y,z);
  1077. tp4 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1078. ltp4 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1079. UpdateDynamic3DTextLabelText(ltp4, -1, inputtext);
  1080. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 4 to save teleport direction!");
  1081. teleport4 = 1;
  1082. }
  1083. return 1;
  1084. }
  1085. if(dialogid == 1015)// Create Teleport #5 //
  1086. {
  1087. if(response)
  1088. {
  1089. if(teleport5 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1090. new Float:x,Float:y,Float:z;
  1091. GetPlayerPos(playerid,x,y,z);
  1092. tp5 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1093. ltp5 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1094. UpdateDynamic3DTextLabelText(ltp5, -1, inputtext);
  1095. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 5 to save teleport direction!");
  1096. teleport5 = 1;
  1097. }
  1098. return 1;
  1099. }
  1100. if(dialogid == 1016)// Create Teleport #6 //
  1101. {
  1102. if(response)
  1103. {
  1104. if(teleport6 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1105. new Float:x,Float:y,Float:z;
  1106. GetPlayerPos(playerid,x,y,z);
  1107. tp6 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1108. ltp6 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1109. UpdateDynamic3DTextLabelText(ltp6, -1, inputtext);
  1110. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 6 to save teleport direction!");
  1111. teleport6 = 1;
  1112. }
  1113. return 1;
  1114. }
  1115. if(dialogid == 1017)// Create Teleport #7 //
  1116. {
  1117. if(response)
  1118. {
  1119. if(teleport7 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1120. new Float:x,Float:y,Float:z;
  1121. GetPlayerPos(playerid,x,y,z);
  1122. tp7 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1123. ltp7 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1124. UpdateDynamic3DTextLabelText(ltp7, -1, inputtext);
  1125. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 7 to save teleport direction!");
  1126. teleport7 = 1;
  1127. }
  1128. return 1;
  1129. }
  1130. if(dialogid == 1018)// Create Teleport #8 //
  1131. {
  1132. if(response)
  1133. {
  1134. if(teleport8 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1135. new Float:x,Float:y,Float:z;
  1136. GetPlayerPos(playerid,x,y,z);
  1137. tp8 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1138. ltp8 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1139. UpdateDynamic3DTextLabelText(ltp8, -1, inputtext);
  1140. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 8 to save teleport direction!");
  1141. teleport8 = 1;
  1142. }
  1143. return 1;
  1144. }
  1145. if(dialogid == 1019)// Create Teleport #9 //
  1146. {
  1147. if(response)
  1148. {
  1149. if(teleport9 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1150. new Float:x,Float:y,Float:z;
  1151. GetPlayerPos(playerid,x,y,z);
  1152. tp9 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1153. ltp9 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1154. UpdateDynamic3DTextLabelText(ltp9, -1, inputtext);
  1155. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 9 to save teleport direction!");
  1156. teleport9 = 1;
  1157. }
  1158. return 1;
  1159. }
  1160. if(dialogid == 1020)// Create Teleport #10 //
  1161. {
  1162. if(response)
  1163. {
  1164. if(teleport10 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  1165. new Float:x,Float:y,Float:z;
  1166. GetPlayerPos(playerid,x,y,z);
  1167. tp10 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  1168. ltp10 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  1169. UpdateDynamic3DTextLabelText(ltp10, -1, inputtext);
  1170. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 10 to save teleport direction!");
  1171. teleport10 = 1;
  1172. }
  1173. return 1;
  1174. }
  1175. if(dialogid == TELEPORTS)// Teleports List //
  1176. {
  1177. if(response)
  1178. {
  1179. if(listitem == 0)// Teleport 0 - Dialog Menu //
  1180. {
  1181. ShowPlayerDialog(playerid, 1010 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1182. }
  1183. if(listitem == 1)// Teleport 1 - Dialog Menu //
  1184. {
  1185. ShowPlayerDialog(playerid, 1011 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1186. }
  1187. if(listitem == 2)// Teleport 2 - Dialog Menu //
  1188. {
  1189. ShowPlayerDialog(playerid, 1012 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1190. }
  1191. if(listitem == 3)// Teleport 3 - Dialog Menu //
  1192. {
  1193. ShowPlayerDialog(playerid, 1013 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1194. }
  1195. if(listitem == 4)// Teleport 4 - Dialog Menu //
  1196. {
  1197. ShowPlayerDialog(playerid, 1014 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1198. }
  1199. if(listitem == 5)// Teleport 5 - Dialog Menu //
  1200. {
  1201. ShowPlayerDialog(playerid, 1015 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1202. }
  1203. if(listitem == 6)// Teleport 6 - Dialog Menu //
  1204. {
  1205. ShowPlayerDialog(playerid, 1016 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1206. }
  1207. if(listitem == 7)// Teleport 7 - Dialog Menu //
  1208. {
  1209. ShowPlayerDialog(playerid, 1017 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1210. }
  1211. if(listitem == 8)// Teleport 8 - Dialog Menu //
  1212. {
  1213. ShowPlayerDialog(playerid, 1018 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1214. }
  1215. if(listitem == 9)// Teleport 9 - Dialog Menu //
  1216. {
  1217. ShowPlayerDialog(playerid, 1019 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1218. }
  1219. if(listitem == 10)// Teleport 10 - Dialog Menu //
  1220. {
  1221. ShowPlayerDialog(playerid, 1020 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  1222. }
  1223. }
  1224. return 1;
  1225. }
  1226. if(dialogid == VEHICLES)
  1227. {
  1228. if(response)
  1229. {
  1230. new CarSpawned[MAX_PLAYERS],currentveh;
  1231. new Float: Pos[4];
  1232. new vid = GetVehicleModel(GetPlayerVehicleID(playerid));
  1233. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  1234. GetPlayerFacingAngle(playerid, Pos[3]);
  1235. currentveh = GetPlayerVehicleID(playerid);
  1236. //DestroyVehicle(currentveh);
  1237. CarSpawned[playerid] = AddStaticVehicleEx(vid, Pos[0], Pos[1], Pos[2], Pos[3], strval(inputtext),strval(inputtext), 0);
  1238. SetVehicleZAngle(currentveh, Pos[3]);
  1239. LinkVehicleToInterior(CarSpawned[playerid], 0);
  1240. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Vehicle created!");
  1241. }
  1242. return 1;
  1243. }
  1244. if(dialogid == TERRITORY)
  1245. {
  1246. if(response)
  1247. {
  1248. if(listitem == 0)
  1249. {
  1250. if(Tprotection > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You already create an territory!");
  1251. if(Makingzone == 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR: You already created an zone! Remove it and try again!");
  1252. ShowPlayerDialog(playerid,1,2,"{FF0000}Territory Colors","{005AFF}Blue\n{FF0000}Red\n{00FF00}Green\n{6600FF}Purple\n{FFFF00}Yellow\n{CCCCFF}Grey\n{00FFFF}Lightblue\n{FFFFFF}White\n{000000}Black","Select","Cancel");
  1253. Makingzone = 1;
  1254. Tprotection = 1;
  1255. }
  1256. if(listitem == 1)
  1257. {
  1258. if(Makingzone == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: Create one first and try again!");
  1259. new string[128];
  1260. KillTimer(Create);
  1261. format(string,sizeof(string),"GangZoneCreate(%f,%f,%f,%f);\r\n",ZMinX,ZMinY,ZMaxX,ZMaxY);
  1262. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory saved!");
  1263. Makingzone = 0;
  1264. }
  1265. if(listitem == 2)
  1266. {
  1267. KillTimer(Create);
  1268. Makingzone = 0;
  1269. Tprotection = 0;
  1270. GangZoneDestroy(GangZone);
  1271. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory destroyed!");
  1272. }
  1273. }
  1274. }
  1275. if(dialogid == 01)
  1276. {
  1277. if(response)
  1278. {
  1279. if(listitem == 0)
  1280. {
  1281. new Float:Z;
  1282. new color;
  1283. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1284. color = 0x0000FFAA;
  1285. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1286. GangZoneShowForAll(GangZone,color);
  1287. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1288. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1289. }
  1290. if(listitem == 1)
  1291. {
  1292. new Float:Z;
  1293. new color;
  1294. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1295. color = 0xFF0000AA;
  1296. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1297. GangZoneShowForAll(GangZone,color);
  1298. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1299. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1300. }
  1301. if(listitem == 2)
  1302. {
  1303. new Float:Z;
  1304. new color;
  1305. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1306. color = 0x00FF00AA;
  1307. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1308. GangZoneShowForAll(GangZone,color);
  1309. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1310. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1311. }
  1312. if(listitem == 3)
  1313. {
  1314. new Float:Z;
  1315. new color;
  1316. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1317. color = 0xFF00FFAA;
  1318. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1319. GangZoneShowForAll(GangZone,color);
  1320. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1321. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1322. }
  1323. if(listitem == 4)
  1324. {
  1325. new Float:Z;
  1326. new color;
  1327. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1328. color = 0xFFFF00AA;
  1329. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1330. GangZoneShowForAll(GangZone,color);
  1331. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1332. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1333. }
  1334. if(listitem == 5)
  1335. {
  1336. new Float:Z;
  1337. new color;
  1338. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1339. color = 0x888888AA;
  1340. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1341. GangZoneShowForAll(GangZone,color);
  1342. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1343. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1344. }
  1345. if(listitem == 6)
  1346. {
  1347. new Float:Z;
  1348. new color;
  1349. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1350. color = 0x00FFFFAA;
  1351. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1352. GangZoneShowForAll(GangZone,color);
  1353. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1354. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1355. }
  1356. if(listitem == 7)
  1357. {
  1358. new Float:Z;
  1359. new color;
  1360. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1361. color = 0xFFFFFFAA;
  1362. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1363. GangZoneShowForAll(GangZone,color);
  1364. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1365. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1366. }
  1367. if(listitem == 8)
  1368. {
  1369. new Float:Z;
  1370. new color;
  1371. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1372. color = 0x000000AA;
  1373. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1374. GangZoneShowForAll(GangZone,color);
  1375. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1376. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1377. }
  1378. }
  1379. else if(!response)
  1380. {
  1381. Makingzone = 0;
  1382. }
  1383. }
  1384. return 0;
  1385. }
  1386. forward Createzone(playerid,color);
  1387. public Createzone(playerid,color)
  1388. {
  1389. GangZoneHideForAll(GangZone);
  1390. GangZoneDestroy(GangZone);
  1391. new Float:Z;
  1392. GetPlayerPos(playerid,ZMaxX,ZMaxY,Z);
  1393. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1394. GangZoneShowForAll(GangZone,color);
  1395. return 1;
  1396. }
  1397. stock IsPlayerInGangZone(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
  1398. {
  1399. new Float:xx, Float:yy, Float:zz;
  1400. GetPlayerPos(playerid, xx, yy, zz);
  1401. if (xx > minx && xx < maxx && yy > miny && yy < maxy) return 1;
  1402. return 0;
  1403. }
  1404. public OnPlayerLeaveDynamicCP(playerid, checkpointid)
  1405. {
  1406. if(checkpointid == capturecp)
  1407. {
  1408. DestroyDynamicCP(capturecp);
  1409. GangZoneStopFlashForAll(GangZone);
  1410. GameTextForPlayer(playerid, "~r~capture failed", 2500, 3);
  1411. UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, "/capture");
  1412. KillTimer(capturetimer);
  1413. DestroyDynamicMapIcon(captureicon);
  1414. }
  1415. return 1;
  1416. }
  1417. public OnPlayerEnterDynamicArea(playerid, areaid)
  1418. {
  1419. if(areaid == capturearea)
  1420. {
  1421. isincapturearea = false;
  1422. }
  1423. if(areaid == ghousearea)
  1424. {
  1425. isinghousearea = false;
  1426. KillTimer(ghouset);
  1427. KillTimer(ghousetx);
  1428. }
  1429. if(areaid == eghousearea)
  1430. {
  1431. isineghousearea = false;
  1432. }
  1433. }
  1434. public OnPlayerLeaveDynamicArea(playerid, areaid)
  1435. {
  1436. if(areaid == capturearea)
  1437. {
  1438. isincapturearea = true;
  1439. }
  1440. if(areaid == ghousearea)
  1441. {
  1442. isinghousearea = true;
  1443. }
  1444. if(areaid == eghousearea)
  1445. {
  1446. isineghousearea = true;
  1447. }
  1448. }
  1449. forward heal(playerid);
  1450. public heal(playerid)
  1451. {
  1452. heal_timer[playerid] = 0;
  1453. KillTimer(heal_timer[playerid]);
  1454. return 1;
  1455. }
  1456. forward armour(playerid);
  1457. public armour(playerid)
  1458. {
  1459. armour_timer[playerid] = 0;
  1460. KillTimer(armour_timer[playerid]);
  1461. return 1;
  1462. }
  1463. forward minigun(playerid);
  1464. public minigun(playerid)
  1465. {
  1466. minigun_timer[playerid] = 0;
  1467. KillTimer(minigun_timer[playerid]);
  1468. return 1;
  1469. }
  1470. forward rocket(playerid);
  1471. public rocket(playerid)
  1472. {
  1473. rocket_timer[playerid] = 0;
  1474. KillTimer(rocket_timer[playerid]);
  1475. return 1;
  1476. }
  1477. forward captured(playerid);
  1478. public captured(playerid)
  1479. {
  1480. GangZoneShowForAll(GangZone,GetPlayerColor(playerid));
  1481. GameTextForPlayer(playerid, "~r~successfully captured!", 2500, 3);
  1482. KillTimer(capturetimer);
  1483. DestroyDynamicCP(capturecp);
  1484. UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, "/capture");
  1485. DestroyDynamicMapIcon(captureicon);
  1486. return 1;
  1487. }
  1488. forward gatertimer(playerid);
  1489. public gatertimer(playerid)
  1490. {
  1491. KillTimer(rtt);
  1492. UpdateDynamic3DTextLabelText(ganggate, -1, "If you are in this gang use {FFFF00}/opengate(/og) {FFFFFF}to open gate \nand {FFFF00}/closegate(/cg) {FFFFFF}to close gate! \n{FF0000}/Blowgate");
  1493. gate = CreateDynamicObject(19912, 2512.45, 2243.23, 12.49, 0.00, 0.00, 0.00);
  1494. GameTextForPlayer(playerid, "~g~~h~Repaired!", 5000, 3);
  1495. Destroyed = 0;
  1496. Planted = 0;
  1497. }
  1498. forward gatetimer(playerid);
  1499. public gatetimer(playerid)
  1500. {
  1501. if(Planted == 1){}
  1502. new Float:x,Float:y,Float:z;
  1503. GetPlayerPos(playerid,x,y,z);
  1504. GetPlayerPos(playerid, posX14, posY14, posZ14);
  1505. GetPlayerFacingAngle(playerid, posA14);
  1506. GameTextForPlayer(playerid, "~g~~h~planted!", 2500, 3);
  1507. bomb = CreateDynamicPickup(1654, 1, posX14, posY14, posZ14, -1);
  1508. KillTimer(gtt);
  1509. gtd = SetTimer("gatedestory",5000,false);
  1510. }
  1511. forward gatedestory(playerid);
  1512. public gatedestory(playerid)
  1513. {
  1514. new string[ 64 ];
  1515. DestroyDynamicPickup(bomb);
  1516. CreateExplosion(posX14, posY14, posZ14, 6, 5.0);
  1517. KillTimer(gtd);
  1518. Planted = 1;
  1519. format( string, sizeof(string), "~r~~h~Your gang gate was destroyed!");
  1520. GameTextForAll(string, 5000, 3);
  1521. DestroyDynamicObject(gate);
  1522. UpdateDynamic3DTextLabelText(ganggate, -1, "If you are in this gang use {FFFF00}/opengate(/og) {FFFFFF}to open gate \nand {FFFF00}/closegate(/cg) {FFFFFF}to close gate! \n{FF0000}/Repairgate");
  1523. Destroyed = 1;
  1524. Planted = 1;
  1525. }
  1526. stock DestroyNearbyVehicles(playerid, Float:radi)
  1527. {
  1528. new Float:x, Float:y, Float:z;
  1529. GetPlayerPos(playerid, x, y, z);
  1530. for(new i=1; i<MAX_VEHICLES; i++)
  1531. {
  1532. if(GetVehicleModel(i))
  1533. {
  1534. new Float:posx, Float:posy, Float:posz;
  1535. new Float:tempposx, Float:tempposy, Float:tempposz;
  1536. GetVehiclePos(i, posx, posy, posz);
  1537. tempposx = (posx - x);
  1538. tempposy = (posy - y);
  1539. tempposz = (posz - z);
  1540. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1541. {
  1542. DestroyVehicle(i);
  1543. }
  1544. }
  1545. }
  1546. }
  1547. stock RespawnNearbyVehicles(playerid, Float:radi)
  1548. {
  1549. new Float:x, Float:y, Float:z;
  1550. GetPlayerPos(playerid, x, y, z);
  1551. for(new i=1; i<MAX_VEHICLES; i++)
  1552. {
  1553. if(GetVehicleModel(i))
  1554. {
  1555. new Float:posx, Float:posy, Float:posz;
  1556. new Float:tempposx, Float:tempposy, Float:tempposz;
  1557. GetVehiclePos(i, posx, posy, posz);
  1558. tempposx = (posx - x);
  1559. tempposy = (posy - y);
  1560. tempposz = (posz - z);
  1561. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1562. {
  1563. SetVehicleToRespawn(i);
  1564. }
  1565. }
  1566. }
  1567. }
RAW Paste Data