Advertisement
Guest User

SAMP - Gang Tester V2.9 - by DjAndy

a guest
Jun 4th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.52 KB | None | 0 0
  1. #include <a_samp>
  2. #include <streamer>
  3. #define EDITGANG 1001
  4. #define GANGBASE 1002
  5. #define TELEPORTS 1003
  6. #define VEHICLES 1004
  7. #define TERRITORY 1005
  8. #define CUSTOMTER 1006
  9. #define RED 0xFF0000FF
  10. //------------------------------------//
  11. new tp; // //
  12. new tp1; // //
  13. new tp2; // //
  14. new tp3; // //
  15. new tp4; // //
  16. new tp5; // TELEPORTS //
  17. new tp6; // //
  18. new tp7; // //
  19. new tp8; // //
  20. new tp9; // //
  21. new tp10; // //
  22. new Text3D:ltp; // //
  23. new Text3D:ltp1; // //
  24. new Text3D:ltp2; // //
  25. new Text3D:ltp3; // //
  26. new Text3D:ltp4; // //
  27. new Text3D:ltp5; // TELEPORT //
  28. new Text3D:ltp6; // TEXTS //
  29. new Text3D:ltp7; // //
  30. new Text3D:ltp8; // //
  31. new Text3D:ltp9; // //
  32. new Text3D:ltp10; // //
  33. new teleport; // Create Teleport Protection #0 //
  34. new teleport1; // Create Teleport Protection #1 //
  35. new teleport2; // Create Teleport Protection #2 //
  36. new teleport3; // Create Teleport Protection #3 //
  37. new teleport4; // Create Teleport Protection #4 //
  38. new teleport5; // Create Teleport Protection #5 //
  39. new teleport6; // Create Teleport Protection #6 //
  40. new teleport7; // Create Teleport Protection #7 //
  41. new teleport8; // Create Teleport Protection #8 //
  42. new teleport9; // Create Teleport Protection #9 //
  43. new teleport10; // Create Teleport Protection #10 //
  44. //--------------------------------------------------------------//
  45. //--------------------------------------------------------------//
  46. new Float:posX; // //
  47. new Float:posY; // //
  48. new Float:posZ; // Gang //
  49. new Float:posA; // Spawn //
  50. new GangSpawn; // //
  51. //--------------------------------------------------------------//
  52. //--------------------------------------------------------------//
  53. new Float:posX0; // //
  54. new Float:posY0; // //
  55. new Float:posZ0; // Teleport //
  56. new Float:posA0; // #0 //
  57. new Teleport0; // //
  58. //--------------------------------------------------------------//
  59. //--------------------------------------------------------------//
  60. new Float:posX1; // //
  61. new Float:posY1; // //
  62. new Float:posZ1; // Teleport //
  63. new Float:posA1; // #1 //
  64. new Teleport1; // //
  65. //--------------------------------------------------------------//
  66. //--------------------------------------------------------------//
  67. new Float:posX2; // //
  68. new Float:posY2; // //
  69. new Float:posZ2; // Teleport //
  70. new Float:posA2; // #2 //
  71. new Teleport2; // //
  72. //--------------------------------------------------------------//
  73. //--------------------------------------------------------------//
  74. new Float:posX3; // //
  75. new Float:posY3; // //
  76. new Float:posZ3; // Teleport //
  77. new Float:posA3; // #3 //
  78. new Teleport3; // //
  79. //--------------------------------------------------------------//
  80. //--------------------------------------------------------------//
  81. new Float:posX4; // //
  82. new Float:posY4; // //
  83. new Float:posZ4; // Teleport //
  84. new Float:posA4; // #4 //
  85. new Teleport4; // //
  86. //--------------------------------------------------------------//
  87. //--------------------------------------------------------------//
  88. new Float:posX5; // //
  89. new Float:posY5; // //
  90. new Float:posZ5; // Teleport //
  91. new Float:posA5; // #5 //
  92. new Teleport5; // //
  93. //--------------------------------------------------------------//
  94. //--------------------------------------------------------------//
  95. new Float:posX6; // //
  96. new Float:posY6; // //
  97. new Float:posZ6; // Teleport //
  98. new Float:posA6; // #6 //
  99. new Teleport6; // //
  100. //--------------------------------------------------------------//
  101. //--------------------------------------------------------------//
  102. new Float:posX7; // //
  103. new Float:posY7; // //
  104. new Float:posZ7; // Teleport //
  105. new Float:posA7; // #7 //
  106. new Teleport7; // //
  107. //--------------------------------------------------------------//
  108. //--------------------------------------------------------------//
  109. new Float:posX8; // //
  110. new Float:posY8; // //
  111. new Float:posZ8; // Teleport //
  112. new Float:posA8; // #8 //
  113. new Teleport8; // //
  114. //--------------------------------------------------------------//
  115. //--------------------------------------------------------------//
  116. new Float:posX9; // //
  117. new Float:posY9; // //
  118. new Float:posZ9; // Teleport //
  119. new Float:posA9; // #9 //
  120. new Teleport9; // //
  121. //--------------------------------------------------------------//
  122. //--------------------------------------------------------------//
  123. new Float:posX10; // //
  124. new Float:posY10; // //
  125. new Float:posZ10; // Teleport //
  126. new Float:posA10; // #10 //
  127. new Teleport10; // //
  128. //--------------------------------------------------------------//
  129. //----------------------------------//
  130. new hp; // Health //
  131. new ar; // Pickups //
  132. new mg; // Weapon //
  133. new rk; // Pickups //
  134. new gate; // Gate Creator //
  135. new Text3D:ganggate;// Gate Text //
  136. new Text3D:thouse; // Gang House //
  137. new ghouse; // Pickup //
  138. new Text3D:textloot;// Loot //
  139. new loot; // Pickup //
  140. new capture; // Capture //
  141. new Text3D:capturet;// Pickup //
  142. new capturecp; // Capture //
  143. new capturetimer; // Protection //
  144. new capturearea, bool:isincapturearea;
  145. //----------------------------------------------------------------------//
  146. //----------------------------------------------------------------------//
  147. new heal_timer[MAX_PLAYERS]; // Heal Pickups //
  148. new armour_timer[MAX_PLAYERS]; // Cooldown //
  149. new minigun_timer[MAX_PLAYERS]; // Weapons Pickups //
  150. new rocket_timer[MAX_PLAYERS]; // Cooldown //
  151. //----------------------------------------------------------------------//
  152. //----------------------------------------------------------------------//
  153. new Float:posX11; // //
  154. new Float:posY11; // //
  155. new Float:posZ11; // BASE //
  156. new Float:posA11; // //
  157. new Base; // //
  158. //--------------------------------------------------------------//
  159. //--------------------------------------------------------------//
  160. new Makingzone; // //
  161. new Float:ZMinX; // //
  162. new Float:ZMaxX; // //
  163. new Float:ZMinY; // Create //
  164. new Float:ZMaxY; // Territory //
  165. new GangZone; // //
  166. new Create; // //
  167. new Tprotection;
  168. //--------------------------------------------------------------//
  169. //--------------------------------------------------------------//
  170. public OnFilterScriptExit()
  171. {
  172. DestroyDynamicCP(tp); //--------------------------------//
  173. DestroyDynamicCP(tp1); // //
  174. DestroyDynamicCP(tp2); // //
  175. DestroyDynamicCP(tp3); // //
  176. DestroyDynamicCP(tp4); // //
  177. DestroyDynamicCP(tp5); // //
  178. DestroyDynamicCP(tp6); // //
  179. DestroyDynamicCP(tp7); // //
  180. DestroyDynamicCP(tp8); // //
  181. DestroyDynamicCP(tp9); // //
  182. DestroyDynamicCP(tp10); // //
  183. DestroyDynamic3DTextLabel(ltp); // //
  184. DestroyDynamic3DTextLabel(ltp1); // //
  185. DestroyDynamic3DTextLabel(ltp2); // //
  186. DestroyDynamic3DTextLabel(ltp3); // //
  187. DestroyDynamic3DTextLabel(ltp4); //--------------------------------//
  188. DestroyDynamic3DTextLabel(ltp5); // Destroy everythink //
  189. DestroyDynamic3DTextLabel(ltp6); // after reload //
  190. DestroyDynamic3DTextLabel(ltp7); //--------------------------------//
  191. DestroyDynamic3DTextLabel(ltp8); // //
  192. DestroyDynamic3DTextLabel(ltp9); // //
  193. DestroyDynamic3DTextLabel(ltp10); // //
  194. DestroyDynamic3DTextLabel(ganggate); // //
  195. DestroyDynamic3DTextLabel(textloot); // //
  196. DestroyDynamic3DTextLabel(thouse); // //
  197. DestroyDynamic3DTextLabel(capturet); // //
  198. DestroyDynamicPickup(hp); // //
  199. DestroyDynamicPickup(ar); // //
  200. DestroyDynamicPickup(loot); // //
  201. DestroyDynamicPickup(capture); // //
  202. DestroyDynamicPickup(ghouse); // //
  203. DestroyDynamicPickup(mg); // //
  204. DestroyDynamicPickup(rk); // //
  205. DestroyDynamicPickup(mg); // //
  206. DestroyDynamicObject(gate); // //
  207. DestroyDynamicPickup(rk); // //
  208. GangZoneHideForAll(GangZone); //--------------------------------//
  209. return 1;
  210. }
  211. public OnPlayerSpawn(playerid)
  212. {
  213. if(GangSpawn == 0) SetPlayerPos(playerid,-2226.6367, 95.9487, 1036.0600),SetPlayerInterior(playerid, 1),SetPlayerFacingAngle(playerid, 0),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid, 0);
  214. if(GangSpawn == 1) SetPlayerPos(playerid, posX, posY, posZ+0.10),SetPlayerFacingAngle(playerid, posA),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);
  215. return 1;
  216. }
  217.  
  218. public OnPlayerCommandText(playerid, cmdtext[])
  219. {
  220. if (strcmp("/editgang", cmdtext, true, 10) == 0)
  221. {
  222. if(IsPlayerAdmin(playerid))
  223. {
  224. 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\n{00FF00}Export File","Select","Close");
  225. }
  226. else
  227. {
  228. }
  229. return 1;
  230. }
  231. if (strcmp("/base", cmdtext, true, 10) == 0)
  232. {
  233. ShowPlayerDialog(playerid, GANGBASE ,DIALOG_STYLE_LIST,"Base Teleports","{FFFF00}Gang Name","Teleport","Close");
  234. return 1;
  235. }
  236. if (strcmp("/gtloc 0", cmdtext, true, 10) == 0)
  237. {
  238. if(IsPlayerAdmin(playerid))
  239. {
  240. new string[128];
  241. if(Teleport0 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  242. GetPlayerPos(playerid, posX0, posY0, posZ0),GetPlayerFacingAngle(playerid, posA1);
  243. Teleport0 = 1;
  244. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  245. }
  246. else
  247. {
  248. }
  249. return 1;
  250. }
  251. if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
  252. {
  253. if(IsPlayerAdmin(playerid))
  254. {
  255. new string[128];
  256. if(Teleport1 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  257. GetPlayerPos(playerid, posX1, posY1, posZ1),GetPlayerFacingAngle(playerid, posA1);
  258. Teleport1 = 1;
  259. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  260. }
  261. else
  262. {
  263. }
  264. return 1;
  265. }
  266. if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
  267. {
  268. if(IsPlayerAdmin(playerid))
  269. {
  270. new string[128];
  271. if(Teleport2 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  272. GetPlayerPos(playerid, posX2, posY2, posZ2),GetPlayerFacingAngle(playerid, posA2);
  273. Teleport2 = 1;
  274. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  275. }
  276. else
  277. {
  278. }
  279. return 1;
  280. }
  281. if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
  282. {
  283. if(IsPlayerAdmin(playerid))
  284. {
  285. new string[128];
  286. if(Teleport3 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  287. GetPlayerPos(playerid, posX3, posY3, posZ3),GetPlayerFacingAngle(playerid, posA3);
  288. Teleport3 = 1;
  289. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  290. }
  291. else
  292. {
  293. }
  294. return 1;
  295. }
  296. if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
  297. {
  298. if(IsPlayerAdmin(playerid))
  299. {
  300. new string[128];
  301. if(Teleport4 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  302. GetPlayerPos(playerid, posX4, posY4, posZ4),GetPlayerFacingAngle(playerid, posA4);
  303. Teleport4 = 1;
  304. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  305. }
  306. else
  307. {
  308. }
  309. return 1;
  310. }
  311. if (strcmp("/gtloc 5", cmdtext, true, 10) == 0)
  312. {
  313. if(IsPlayerAdmin(playerid))
  314. {
  315. new string[128];
  316. if(Teleport5 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  317. GetPlayerPos(playerid, posX5, posY5, posZ5),GetPlayerFacingAngle(playerid, posA5);
  318. Teleport5 = 1;
  319. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  320. }
  321. else
  322. {
  323. }
  324. return 1;
  325. }
  326. if (strcmp("/gtloc 6", cmdtext, true, 10) == 0)
  327. {
  328. if(IsPlayerAdmin(playerid))
  329. {
  330. new string[128];
  331. if(Teleport6 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  332. GetPlayerPos(playerid, posX6, posY6, posZ6),GetPlayerFacingAngle(playerid, posA6);
  333. Teleport6 = 1;
  334. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  335. }
  336. else
  337. {
  338. }
  339. return 1;
  340. }
  341. if (strcmp("/gtloc 7", cmdtext, true, 10) == 0)
  342. {
  343. if(IsPlayerAdmin(playerid))
  344. {
  345. new string[128];
  346. if(Teleport7 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  347. SetPlayerPos(playerid, posX7, posY7, posZ7),GetPlayerFacingAngle(playerid, posA7);
  348. Teleport7 = 1;
  349. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  350. }
  351. else
  352. {
  353. }
  354. return 1;
  355. }
  356. if (strcmp("/gtloc 8", cmdtext, true, 10) == 0)
  357. {
  358. if(IsPlayerAdmin(playerid))
  359. {
  360. new string[128];
  361. if(Teleport8 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  362. GetPlayerPos(playerid, posX8, posY8, posZ8),GetPlayerFacingAngle(playerid, posA8);
  363. Teleport8 = 1;
  364. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  365. }
  366. else
  367. {
  368. }
  369. return 1;
  370. }
  371. if (strcmp("/gtloc 9", cmdtext, true, 10) == 0)
  372. {
  373. if(IsPlayerAdmin(playerid))
  374. {
  375. new string[128];
  376. if(Teleport9 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  377. GetPlayerPos(playerid, posX9, posY9, posZ9),GetPlayerFacingAngle(playerid, posA9);
  378. Teleport9 = 1;
  379. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  380. }
  381. else
  382. {
  383. }
  384. return 1;
  385. }
  386. if (strcmp("/gtloc 10", cmdtext, true, 10) == 0)
  387. {
  388. if(IsPlayerAdmin(playerid))
  389. {
  390. new string[128];
  391. if(Teleport10 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  392. GetPlayerPos(playerid, posX10, posY10, posZ10),GetPlayerFacingAngle(playerid, posA10);
  393. Teleport10 = 1;
  394. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
  395. }
  396. else
  397. {
  398. }
  399. return 1;
  400. }
  401. if(strcmp("/capture", cmdtext, true, 10) == 0)
  402. {
  403. if(isincapturearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the capture pickup!");
  404. {
  405. new name[24], string[64], string1[64];
  406. new Float:x, Float:y, Float:z;
  407. GetPlayerPos(playerid, x, y, z);
  408. GetPlayerName( playerid, name, 24 );
  409. GangZoneFlashForAll(GangZone,RED);
  410. capturecp = CreateDynamicCP(x, y, z-0.90, 5, -1, -1, -1, 25, -1, 0);
  411. format(string, sizeof(string), "~r~Capture started ~n~~y~by ~b~%s", name,GetPlayerColor(playerid));
  412. GameTextForAll(string, 5000, 3);
  413. format(string1,sizeof(string1), "Capturing by: {005AFF}%s", name);
  414. UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, string1);
  415. capturetimer = SetTimer("captured",10000,false);
  416. }
  417. return 1;
  418. }
  419. ////////////////////////////////////////////////////////////////////////////////
  420. // You have to manualy update gate direction once you add a new one everytime //
  421. ////////////////////////////////////////////////////////////////////////////////
  422. if(strcmp("/og", cmdtext, true, 10) == 0)
  423. {
  424. if(IsPlayerInRangeOfPoint(playerid, 15, 1459.6454, -1890.7972, 22.2568))
  425. {
  426. MoveDynamicObject(gate, 1459.6454, -1899.5972, 22.2568, 3, 0, 0, -90);
  427. }
  428. else
  429. {
  430. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
  431. }
  432. return 1;
  433. }
  434. if(strcmp("/cg", cmdtext, true, 10) == 0)
  435. {
  436. if(IsPlayerInRangeOfPoint(playerid, 15, 1459.6454, -1890.7972, 22.2568))
  437. {
  438. MoveDynamicObject(gate, 1459.6454, -1890.7972, 22.2568, 3, 0, 0, -90);
  439. }
  440. else
  441. {
  442. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
  443. }
  444. return 1;
  445. }
  446. return 0;
  447. }
  448. ////////////////////////////////////////////////////////////////////////////////
  449. // You have to manualy update gate direction once you add a new one everytime //
  450. ////////////////////////////////////////////////////////////////////////////////
  451. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  452. {
  453. if(pickupid == hp)
  454. {
  455. if(heal_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can heal only once every 30 seconds!");
  456. SetPlayerHealth(playerid,100),GameTextForPlayer(playerid, "~r~~h~Hp Filled", 2500, 3),heal_timer[playerid] = SetTimer("heal",30000,true);
  457. }
  458. if(pickupid == ar)
  459. {
  460. if(armour_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can heal only once every 30 seconds!");
  461. SetPlayerArmour(playerid,100),GameTextForPlayer(playerid, "~b~~h~Armour Filled", 2500, 3),armour_timer[playerid] = SetTimer("armour",30000,true);
  462. }
  463. if(pickupid == mg)
  464. {
  465. if(minigun_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can load this gun only once every 1 minute!");
  466. GivePlayerWeapon(playerid, 38, 50),GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3),minigun_timer[playerid] = SetTimer("minigun",60000,true);
  467. }
  468. if(pickupid == rk)
  469. {
  470. if(rocket_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can load this gun only once every 1 minute!");
  471. GivePlayerWeapon(playerid, 35, 10),GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3),rocket_timer[playerid] = SetTimer("rocket",60000,true);
  472. }
  473. if(pickupid == ghouse)
  474. {
  475. }
  476. if(pickupid == loot)
  477. {
  478. }
  479. if(pickupid == capture)
  480. {
  481. }
  482. return 1;
  483. }
  484. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  485. {
  486. if(checkpointid == tp)
  487. {
  488. if(Teleport0 == 1) SetPlayerPos(playerid, posX0, posY0, posZ0),SetPlayerFacingAngle(playerid, posA0),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  489. }
  490. if(checkpointid == tp1)
  491. {
  492. if(Teleport1 == 1) SetPlayerPos(playerid, posX1, posY1, posZ1),SetPlayerFacingAngle(playerid, posA1),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  493. }
  494. if(checkpointid == tp2)
  495. {
  496. if(Teleport2 == 1)SetPlayerPos(playerid, posX2, posY2, posZ2),SetPlayerFacingAngle(playerid, posA2),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  497. }
  498. if(checkpointid == tp3)
  499. {
  500. if(Teleport3 == 1)SetPlayerPos(playerid, posX3, posY3, posZ3),SetPlayerFacingAngle(playerid, posA3),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  501. }
  502. if(checkpointid == tp4)
  503. {
  504. if(Teleport4 == 1)SetPlayerPos(playerid, posX4, posY4, posZ4),SetPlayerFacingAngle(playerid, posA4),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  505. }
  506. if(checkpointid == tp5)
  507. {
  508. if(Teleport5 == 1)SetPlayerPos(playerid, posX5, posY5, posZ5),SetPlayerFacingAngle(playerid, posA5),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  509. }
  510. if(checkpointid == tp6)
  511. {
  512. if(Teleport6 == 1)SetPlayerPos(playerid, posX6, posY6, posZ6),SetPlayerFacingAngle(playerid, posA6),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  513. }
  514. if(checkpointid == tp7)
  515. {
  516. if(Teleport7 == 1)SetPlayerPos(playerid, posX7, posY7, posZ7),SetPlayerFacingAngle(playerid, posA7),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  517. }
  518. if(checkpointid == tp8)
  519. {
  520. if(Teleport8 == 1)SetPlayerPos(playerid, posX8, posY8, posZ8),SetPlayerFacingAngle(playerid, posA8),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  521. }
  522. if(checkpointid == tp9)
  523. {
  524. if(Teleport9 == 1)SetPlayerPos(playerid, posX9, posY9, posZ9),SetPlayerFacingAngle(playerid, posA9),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  525. }
  526. if(checkpointid == tp10)
  527. {
  528. if(Teleport10 == 1)SetPlayerPos(playerid, posX10, posY10, posZ10),SetPlayerFacingAngle(playerid, posA10),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  529. }
  530. if(checkpointid == capturecp)
  531. {
  532. }
  533. return 1;
  534. }
  535.  
  536. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  537. {
  538. if(dialogid == EDITGANG)
  539. {
  540. if(response)
  541. {
  542. if(listitem == 0)//GANG SPAWN
  543. {
  544. GetPlayerPos(playerid, posX, posY, posZ),GetPlayerFacingAngle(playerid, posA),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn saved!"),GangSpawn = 1;
  545. }
  546. if(listitem == 1)//GANG CAPTURE
  547. {
  548. DestroyDynamicPickup(capture);
  549. DestroyDynamic3DTextLabel(capturet);
  550. DestroyDynamicArea(capturearea);
  551. new Float:x, Float:y, Float:z;
  552. GetPlayerPos(playerid, x, y, z);
  553. capture = CreateDynamicPickup(1314, 1, x, y, z, -1);
  554. capturet = CreateDynamic3DTextLabel("{FF0000}/capture", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  555. capturearea = CreateDynamicCircle(x, y, 0.50, -1, -1, -1);
  556. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture saved!");
  557. }
  558. if(listitem == 2)//GANG HOUSE
  559. {
  560. DestroyDynamicPickup(ghouse);
  561. DestroyDynamic3DTextLabel(thouse);
  562. new Float:x, Float:y, Float:z;
  563. GetPlayerPos(playerid, x, y, z);
  564. ghouse = CreateDynamicPickup(1239, 1, x, y, z, -1);
  565. thouse = CreateDynamic3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 0);
  566. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House saved!");
  567. }
  568. if(listitem == 3)//GANG BASE
  569. {
  570. GetPlayerPos(playerid, posX11, posY11, posZ11),GetPlayerFacingAngle(playerid, posA11),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Base saved!"),Base = 1;
  571. }
  572. if(listitem == 4)//GANG LOOT
  573. {
  574. DestroyDynamicPickup(loot);
  575. DestroyDynamic3DTextLabel(textloot);
  576. new Float:x, Float:y, Float:z;
  577. GetPlayerPos(playerid, x, y, z);
  578. loot = CreateDynamicPickup(1550, 1, x, y, z, -1);
  579. 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, 0, -1, 0);
  580. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Loot saved!");
  581. }
  582. if(listitem == 5)//GANG HEALTH
  583. {
  584. DestroyDynamicPickup(hp);
  585. new Float:x, Float:y, Float:z;
  586. GetPlayerPos(playerid, x, y, z);
  587. hp = CreateDynamicPickup(1240, 1, x, y, z, -1);
  588. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Health saved!");
  589. }
  590. if(listitem == 6)//GANG ARMOUR
  591. {
  592. DestroyDynamicPickup(ar);
  593. new Float:x, Float:y, Float:z;
  594. GetPlayerPos(playerid, x, y, z);
  595. ar = CreateDynamicPickup(1242, 1, x, y, z, -1);
  596. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Armour saved!");
  597. }
  598. if(listitem == 7)//GANG MINIGUN
  599. {
  600. DestroyDynamicPickup(mg);
  601. new Float:x, Float:y, Float:z;
  602. GetPlayerPos(playerid, x, y, z);
  603. mg = CreateDynamicPickup(362, 1, x, y, z, -1);
  604. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Minigun saved!");
  605. }
  606. if(listitem == 8)//GANG ROCKET
  607. {
  608. DestroyDynamicPickup(rk);
  609. new Float:x, Float:y, Float:z;
  610. GetPlayerPos(playerid, x, y, z);
  611. rk = CreateDynamicPickup(359, 1, x, y, z, -1);
  612. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Rocket saved!");
  613. }
  614. if(listitem == 9)//REMOVE VEHICLES
  615. {
  616. DestroyNearbyVehicles(playerid, 250);
  617. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Vehicles removed!");
  618. }
  619. if(listitem == 10)//SET VEHICLES
  620. {
  621. if(IsPlayerInAnyVehicle(playerid))
  622. {
  623. 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");
  624. }
  625. else
  626. {
  627. SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not in a vehicle");
  628. }
  629. }
  630. if(listitem == 11)//REMOVE TELEPORTS
  631. {
  632. DestroyDynamicCP(tp);
  633. DestroyDynamicCP(tp1);
  634. DestroyDynamicCP(tp2);
  635. DestroyDynamicCP(tp3);
  636. DestroyDynamicCP(tp4);
  637. DestroyDynamicCP(tp5);
  638. DestroyDynamicCP(tp6);
  639. DestroyDynamicCP(tp7);
  640. DestroyDynamicCP(tp8);
  641. DestroyDynamicCP(tp9);
  642. DestroyDynamicCP(tp10);
  643. DestroyDynamic3DTextLabel(ltp);
  644. DestroyDynamic3DTextLabel(ltp1);
  645. DestroyDynamic3DTextLabel(ltp2);
  646. DestroyDynamic3DTextLabel(ltp3);
  647. DestroyDynamic3DTextLabel(ltp4);
  648. DestroyDynamic3DTextLabel(ltp5);
  649. DestroyDynamic3DTextLabel(ltp6);
  650. DestroyDynamic3DTextLabel(ltp7);
  651. DestroyDynamic3DTextLabel(ltp8);
  652. DestroyDynamic3DTextLabel(ltp9);
  653. DestroyDynamic3DTextLabel(ltp10);
  654. SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleports removed!");
  655. }
  656. if(listitem == 12)//SET TELEPORTS
  657. {
  658. 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");
  659. }
  660. if(listitem == 13)//SET TERRITORY
  661. {
  662. ShowPlayerDialog(playerid, TERRITORY, 2,"{FF0000}Set Territory List","{FF0000}Create Territory\n{FF0000}Save Territory\n{FF0000}Destroy Territory","Select","Cancel");
  663. return 1;
  664. }
  665. if(listitem == 14)//RELOAD GATE
  666. {
  667. //SendClientMessage(playerid, 0xFF0000FF, "ERROR: There is no gate loaded!");
  668. DestroyDynamicObject(gate);
  669. DestroyDynamic3DTextLabel(ganggate);
  670. 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, 1459.6514, -1895.2687, 24.1258, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 0);
  671. gate = CreateDynamicObject(976, 1459.6454, -1890.7972, 22.2568, 0.00, 0.00, -90);
  672. SendClientMessage(playerid, 0x00CC3300, "SUCCES: Gate reloaded!");
  673. }
  674. if(listitem == 15)//EXPORT FILE
  675. {
  676. SendClientMessage(playerid, 0xFF0000FF, "ERROR: This new functions is under development!");
  677. }
  678. }
  679. return 1;
  680. }
  681. if(dialogid == GANGBASE)// Save Base Teleport //
  682. {
  683. if(response)
  684. {
  685. if(Base == 1)
  686. {
  687. SetPlayerPos(playerid, posX11, posY11, posZ11),SetPlayerFacingAngle(playerid, posA11),SetPlayerInterior(playerid, 0),SetCameraBehindPlayer(playerid),GameTextForPlayer(playerid,"~g~~h~Teleported",2000,3);
  688. }
  689. else
  690. {
  691. SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Base is not saved!");
  692. }
  693. }
  694. return 1;
  695. }
  696. if(dialogid == 1010)// Create Teleport #0 //
  697. {
  698. if(response)
  699. {
  700. if(teleport > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  701. new Float:x,Float:y,Float:z;
  702. GetPlayerPos(playerid,x,y,z);
  703. tp = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 25, -1, 0);
  704. ltp = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  705. UpdateDynamic3DTextLabelText(ltp, -1, inputtext);
  706. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 0 to save teleport direction!");
  707. teleport = 1;
  708. }
  709. return 1;
  710. }
  711. if(dialogid == 1011)// Create Teleport #1 //
  712. {
  713. if(response)
  714. {
  715. if(teleport1 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  716. new Float:x,Float:y,Float:z;
  717. GetPlayerPos(playerid,x,y,z);
  718. tp1 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 25, -1, 0);
  719. ltp1 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  720. UpdateDynamic3DTextLabelText(ltp1, -1, inputtext);
  721. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 1 to save teleport direction!");
  722. teleport1 = 1;
  723. }
  724. return 1;
  725. }
  726. if(dialogid == 1012)// Create Teleport #2 //
  727. {
  728. if(response)
  729. {
  730. if(teleport2 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  731. new Float:x,Float:y,Float:z;
  732. GetPlayerPos(playerid,x,y,z);
  733. tp2 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  734. ltp2 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  735. UpdateDynamic3DTextLabelText(ltp2, -1, inputtext);
  736. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 2 to save teleport direction!");
  737. teleport2 = 1;
  738. }
  739. return 1;
  740. }
  741. if(dialogid == 1013)// Create Teleport #3 //
  742. {
  743. if(response)
  744. {
  745. if(teleport3 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  746. new Float:x,Float:y,Float:z;
  747. GetPlayerPos(playerid,x,y,z);
  748. tp3 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  749. ltp3 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  750. UpdateDynamic3DTextLabelText(ltp3, -1, inputtext);
  751. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 3 to save teleport direction!");
  752. teleport3 = 1;
  753. }
  754. return 1;
  755. }
  756. if(dialogid == 1014)// Create Teleport #4 //
  757. {
  758. if(response)
  759. {
  760. if(teleport4 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  761. new Float:x,Float:y,Float:z;
  762. GetPlayerPos(playerid,x,y,z);
  763. tp4 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  764. ltp4 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  765. UpdateDynamic3DTextLabelText(ltp4, -1, inputtext);
  766. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 4 to save teleport direction!");
  767. teleport4 = 1;
  768. }
  769. return 1;
  770. }
  771. if(dialogid == 1015)// Create Teleport #5 //
  772. {
  773. if(response)
  774. {
  775. if(teleport5 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  776. new Float:x,Float:y,Float:z;
  777. GetPlayerPos(playerid,x,y,z);
  778. tp5 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  779. ltp5 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  780. UpdateDynamic3DTextLabelText(ltp5, -1, inputtext);
  781. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 5 to save teleport direction!");
  782. teleport5 = 1;
  783. }
  784. return 1;
  785. }
  786. if(dialogid == 1016)// Create Teleport #6 //
  787. {
  788. if(response)
  789. {
  790. if(teleport6 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  791. new Float:x,Float:y,Float:z;
  792. GetPlayerPos(playerid,x,y,z);
  793. tp6 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  794. ltp6 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  795. UpdateDynamic3DTextLabelText(ltp6, -1, inputtext);
  796. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 6 to save teleport direction!");
  797. teleport6 = 1;
  798. }
  799. return 1;
  800. }
  801. if(dialogid == 1017)// Create Teleport #7 //
  802. {
  803. if(response)
  804. {
  805. if(teleport7 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  806. new Float:x,Float:y,Float:z;
  807. GetPlayerPos(playerid,x,y,z);
  808. tp7 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  809. ltp7 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  810. UpdateDynamic3DTextLabelText(ltp7, -1, inputtext);
  811. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 7 to save teleport direction!");
  812. teleport7 = 1;
  813. }
  814. return 1;
  815. }
  816. if(dialogid == 1018)// Create Teleport #8 //
  817. {
  818. if(response)
  819. {
  820. if(teleport8 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  821. new Float:x,Float:y,Float:z;
  822. GetPlayerPos(playerid,x,y,z);
  823. tp8 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  824. ltp8 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  825. UpdateDynamic3DTextLabelText(ltp8, -1, inputtext);
  826. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 8 to save teleport direction!");
  827. teleport8 = 1;
  828. }
  829. return 1;
  830. }
  831. if(dialogid == 1019)// Create Teleport #9 //
  832. {
  833. if(response)
  834. {
  835. if(teleport9 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  836. new Float:x,Float:y,Float:z;
  837. GetPlayerPos(playerid,x,y,z);
  838. tp9 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  839. ltp9 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  840. UpdateDynamic3DTextLabelText(ltp9, -1, inputtext);
  841. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 9 to save teleport direction!");
  842. teleport9 = 1;
  843. }
  844. return 1;
  845. }
  846. if(dialogid == 1020)// Create Teleport #10 //
  847. {
  848. if(response)
  849. {
  850. if(teleport10 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  851. new Float:x,Float:y,Float:z;
  852. GetPlayerPos(playerid,x,y,z);
  853. tp10 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
  854. ltp10 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
  855. UpdateDynamic3DTextLabelText(ltp10, -1, inputtext);
  856. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 10 to save teleport direction!");
  857. teleport10 = 1;
  858. }
  859. return 1;
  860. }
  861. if(dialogid == TELEPORTS)// Teleports List //
  862. {
  863. if(response)
  864. {
  865. if(listitem == 0)// Teleport 0 - Dialog Menu //
  866. {
  867. ShowPlayerDialog(playerid, 1010 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  868. }
  869. if(listitem == 1)// Teleport 1 - Dialog Menu //
  870. {
  871. ShowPlayerDialog(playerid, 1011 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  872. }
  873. if(listitem == 2)// Teleport 2 - Dialog Menu //
  874. {
  875. ShowPlayerDialog(playerid, 1012 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  876. }
  877. if(listitem == 3)// Teleport 3 - Dialog Menu //
  878. {
  879. ShowPlayerDialog(playerid, 1013 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  880. }
  881. if(listitem == 4)// Teleport 4 - Dialog Menu //
  882. {
  883. ShowPlayerDialog(playerid, 1014 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  884. }
  885. if(listitem == 5)// Teleport 5 - Dialog Menu //
  886. {
  887. ShowPlayerDialog(playerid, 1015 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  888. }
  889. if(listitem == 6)// Teleport 6 - Dialog Menu //
  890. {
  891. ShowPlayerDialog(playerid, 1016 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  892. }
  893. if(listitem == 7)// Teleport 7 - Dialog Menu //
  894. {
  895. ShowPlayerDialog(playerid, 1017 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  896. }
  897. if(listitem == 8)// Teleport 8 - Dialog Menu //
  898. {
  899. ShowPlayerDialog(playerid, 1018 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  900. }
  901. if(listitem == 9)// Teleport 9 - Dialog Menu //
  902. {
  903. ShowPlayerDialog(playerid, 1019 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  904. }
  905. if(listitem == 10)// Teleport 10 - Dialog Menu //
  906. {
  907. ShowPlayerDialog(playerid, 1020 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  908. }
  909. }
  910. return 1;
  911. }
  912. if(dialogid == VEHICLES)
  913. {
  914. if(response)
  915. {
  916. new CarSpawned[MAX_PLAYERS],currentveh;
  917. new Float: Pos[4];
  918. new vid = GetVehicleModel(GetPlayerVehicleID(playerid));
  919. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  920. GetPlayerFacingAngle(playerid, Pos[3]);
  921. GetVehicleZAngle(vid,Pos[3]);
  922. currentveh = GetPlayerVehicleID(playerid);
  923. DestroyVehicle(currentveh);
  924. CarSpawned[playerid] = AddStaticVehicleEx(vid, Pos[0], Pos[1], Pos[2], Pos[3], strval(inputtext),strval(inputtext), 0);
  925. LinkVehicleToInterior(CarSpawned[playerid], 0);
  926. SendClientMessage(playerid,0x00CC3300, "SUCCESS: Vehicle created!");
  927. }
  928. return 1;
  929. }
  930. if(dialogid == CUSTOMTER)
  931. {
  932. if(response)
  933. {
  934. if(listitem == 0)
  935. {
  936. SendClientMessage(playerid,0x00CC3300,"ERROR: This function is not !");
  937. }
  938. }
  939. }
  940. if(dialogid == TERRITORY)
  941. {
  942. if(response)
  943. {
  944. if(listitem == 0)
  945. {
  946. if(Tprotection > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You already create an territory!");
  947. if(Makingzone == 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR: You already created an zone! Remove it and try again!");
  948. ShowPlayerDialog(playerid,1,2,"{FF0000}Territory Colors","Blue\nRed\nGreen\nPurple\nYellow\nGrey\nLightblue\nWhite\nBlack\n{FF0000}Custom!","Select","Cancel");
  949. Makingzone = 1;
  950. Tprotection = 1;
  951. }
  952. if(listitem == 1)
  953. {
  954. if(Makingzone == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: Create one first and try again!");
  955. new string[128];
  956. KillTimer(Create);
  957. format(string,sizeof(string),"GangZoneCreate(%f,%f,%f,%f);\r\n",ZMinX,ZMinY,ZMaxX,ZMaxY);
  958. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory saved!");
  959. Makingzone = 0;
  960. }
  961. if(listitem == 2)
  962. {
  963. KillTimer(Create);
  964. Makingzone = 0;
  965. Tprotection = 0;
  966. GangZoneDestroy(GangZone);
  967. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory destroyed!");
  968. }
  969. }
  970. }
  971. if(dialogid == 01)
  972. {
  973. if(response)
  974. {
  975. if(listitem == 0)
  976. {
  977. new Float:Z;
  978. new color;
  979. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  980. color = 0x0000FFAA;
  981. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  982. GangZoneShowForAll(GangZone,color);
  983. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  984. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  985. }
  986. if(listitem == 1)
  987. {
  988. new Float:Z;
  989. new color;
  990. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  991. color = 0xFF0000AA;
  992. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  993. GangZoneShowForAll(GangZone,color);
  994. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  995. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  996. }
  997. if(listitem == 2)
  998. {
  999. new Float:Z;
  1000. new color;
  1001. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1002. color = 0x00FF00AA;
  1003. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1004. GangZoneShowForAll(GangZone,color);
  1005. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1006. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1007. }
  1008. if(listitem == 3)
  1009. {
  1010. new Float:Z;
  1011. new color;
  1012. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1013. color = 0xFF00FFAA;
  1014. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1015. GangZoneShowForAll(GangZone,color);
  1016. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1017. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1018. }
  1019. if(listitem == 4)
  1020. {
  1021. new Float:Z;
  1022. new color;
  1023. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1024. color = 0xFFFF00AA;
  1025. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1026. GangZoneShowForAll(GangZone,color);
  1027. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1028. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1029. }
  1030. if(listitem == 5)
  1031. {
  1032. new Float:Z;
  1033. new color;
  1034. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1035. color = 0x888888AA;
  1036. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1037. GangZoneShowForAll(GangZone,color);
  1038. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1039. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1040. }
  1041. if(listitem == 6)
  1042. {
  1043. new Float:Z;
  1044. new color;
  1045. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1046. color = 0x00FFFFAA;
  1047. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1048. GangZoneShowForAll(GangZone,color);
  1049. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1050. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1051. }
  1052. if(listitem == 7)
  1053. {
  1054. new Float:Z;
  1055. new color;
  1056. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1057. color = 0xFFFFFFAA;
  1058. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1059. GangZoneShowForAll(GangZone,color);
  1060. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1061. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1062. }
  1063. if(listitem == 8)
  1064. {
  1065. new Float:Z;
  1066. new color;
  1067. GetPlayerPos(playerid,ZMinX,ZMinY,Z);
  1068. color = 0x000000AA;
  1069. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1070. GangZoneShowForAll(GangZone,color);
  1071. Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
  1072. SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
  1073. }
  1074. if(listitem == 9)
  1075. {
  1076. ShowPlayerDialog(playerid, CUSTOMTER ,DIALOG_STYLE_INPUT,"{FF0000}Territory Color","Write an hexcolor bellow","Create","Close");
  1077. }
  1078. }
  1079. else if(!response)
  1080. {
  1081. Makingzone = 0;
  1082. }
  1083. }
  1084. return 0;
  1085. }
  1086. forward Createzone(playerid,color);
  1087. public Createzone(playerid,color)
  1088. {
  1089. GangZoneHideForAll(GangZone);
  1090. GangZoneDestroy(GangZone);
  1091. new Float:Z;
  1092. GetPlayerPos(playerid,ZMaxX,ZMaxY,Z);
  1093. GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
  1094. GangZoneShowForAll(GangZone,color);
  1095. return 1;
  1096. }
  1097. stock IsPlayerInGangZone(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
  1098. {
  1099. new Float:xx, Float:yy, Float:zz;
  1100. GetPlayerPos(playerid, xx, yy, zz);
  1101. if (xx > minx && xx < maxx && yy > miny && yy < maxy) return 1;
  1102. return 0;
  1103. }
  1104. public OnPlayerLeaveDynamicCP(playerid, checkpointid)
  1105. {
  1106. if(checkpointid == capturecp)
  1107. {
  1108. DestroyDynamicCP(capturecp);
  1109. GangZoneStopFlashForAll(GangZone);
  1110. GameTextForPlayer(playerid, "~r~capture failed", 2500, 3);
  1111. UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, "/capture");
  1112. KillTimer(capturetimer);
  1113. }
  1114. return 1;
  1115. }
  1116. public OnPlayerEnterDynamicArea(playerid, areaid)
  1117. {
  1118. if(areaid == capturearea)
  1119. {
  1120. isincapturearea = false;
  1121. }
  1122. }
  1123. public OnPlayerLeaveDynamicArea(playerid, areaid)
  1124. {
  1125. if(areaid == capturearea)
  1126. {
  1127. isincapturearea = true;
  1128. }
  1129. }
  1130. forward heal(playerid);
  1131. public heal(playerid)
  1132. {
  1133. heal_timer[playerid] = 0;
  1134. KillTimer(heal_timer[playerid]);
  1135. return 1;
  1136. }
  1137. forward armour(playerid);
  1138. public armour(playerid)
  1139. {
  1140. armour_timer[playerid] = 0;
  1141. KillTimer(armour_timer[playerid]);
  1142. return 1;
  1143. }
  1144. forward minigun(playerid);
  1145. public minigun(playerid)
  1146. {
  1147. minigun_timer[playerid] = 0;
  1148. KillTimer(minigun_timer[playerid]);
  1149. return 1;
  1150. }
  1151. forward rocket(playerid);
  1152. public rocket(playerid)
  1153. {
  1154. rocket_timer[playerid] = 0;
  1155. KillTimer(rocket_timer[playerid]);
  1156. return 1;
  1157. }
  1158. forward captured(playerid);
  1159. public captured(playerid)
  1160. {
  1161. GangZoneShowForAll(GangZone,GetPlayerColor(playerid));
  1162. GameTextForPlayer(playerid, "~r~successfully captured!", 2500, 3);
  1163. KillTimer(capturetimer);
  1164. DestroyDynamicCP(capturecp);
  1165. UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, "/capture");
  1166. return 1;
  1167. }
  1168.  
  1169. stock RespawnNearbyVehicles(playerid, Float:radi)
  1170. {
  1171. new Float:x, Float:y, Float:z;
  1172. GetPlayerPos(playerid, x, y, z);
  1173. for(new i=1; i<MAX_VEHICLES; i++)
  1174. {
  1175. if(GetVehicleModel(i))
  1176. {
  1177. new Float:posx, Float:posy, Float:posz;
  1178. new Float:tempposx, Float:tempposy, Float:tempposz;
  1179. GetVehiclePos(i, posx, posy, posz);
  1180. tempposx = (posx - x);
  1181. tempposy = (posy - y);
  1182. tempposz = (posz - z);
  1183. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1184. {
  1185. SetVehicleToRespawn(i);
  1186. }
  1187. }
  1188. }
  1189. }
  1190. stock DestroyNearbyVehicles(playerid, Float:radi)
  1191. {
  1192. new Float:x, Float:y, Float:z;
  1193. GetPlayerPos(playerid, x, y, z);
  1194. for(new i=1; i<MAX_VEHICLES; i++)
  1195. {
  1196. if(GetVehicleModel(i))
  1197. {
  1198. new Float:posx, Float:posy, Float:posz;
  1199. new Float:tempposx, Float:tempposy, Float:tempposz;
  1200. GetVehiclePos(i, posx, posy, posz);
  1201. tempposx = (posx - x);
  1202. tempposy = (posy - y);
  1203. tempposz = (posz - z);
  1204. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  1205. {
  1206. DestroyVehicle(i);
  1207. }
  1208. }
  1209. }
  1210. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement