Advertisement
Guest User

SAMP - Gang Tester V2.2 - by DjAndy

a guest
Feb 25th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.77 KB | None | 0 0
  1. #include <a_samp> // Include //
  2. #include <streamer> // Include //
  3. //----------------------------------//
  4. //----------------------------------//
  5. new tp1; // //
  6. new tp2; // //
  7. new tp3; // //
  8. new tp4; // //
  9. new tp5; // TELEPORTS //
  10. new tp6; // //
  11. new tp7; // //
  12. new tp8; // //
  13. new tp9; // //
  14. new tp10; // //
  15. //----------------------------------//
  16. //----------------------------------//
  17. new Text3D:ltp1; // //
  18. new Text3D:ltp2; // //
  19. new Text3D:ltp3; // //
  20. new Text3D:ltp4; // //
  21. new Text3D:ltp5; // TELEPORT //
  22. new Text3D:ltp6; // TEXTS //
  23. new Text3D:ltp7; // //
  24. new Text3D:ltp8; // //
  25. new Text3D:ltp9; // //
  26. new Text3D:ltp10; // //
  27. //----------------------------------//
  28. //----------------------------------//
  29. new hp; // Health //
  30. new ar; // Pickups //
  31. //----------------------------------//
  32. //----------------------------------//
  33. new mg; // Weapon //
  34. new rk; // Pickups //
  35. //----------------------------------//
  36. //----------------------------------//
  37. new Text3D:texthouse; // Gang House //
  38. new ghouse; // Pickup //
  39. //----------------------------------//
  40. //----------------------------------//
  41. new Text3D:textloot;// Loot //
  42. new loot; // Pickup //
  43. //------------------------------------------------------//
  44. //------------------------------------------------------//
  45. new heal_timer[MAX_PLAYERS]; // Heal Pickups //
  46. new armour_timer[MAX_PLAYERS]; // Cooldown //
  47. //------------------------------------------------------//
  48. //------------------------------------------------------//
  49. new minigun_timer[MAX_PLAYERS]; // Weapons Pickups //
  50. new rocket_timer[MAX_PLAYERS]; // Cooldown //
  51. //------------------------------------------------------//
  52. //------------------------------------------------------//
  53. new base_timer[MAX_PLAYERS]; // Base Protection //
  54. //------------------------------------------------------//
  55. //------------------------------------------------------//
  56. new rp_timer[MAX_PLAYERS]; // Pickups Protection //
  57. //------------------------------------------------------//
  58. //------------------------------------------------------//
  59. new wp_timer[MAX_PLAYERS]; // Weapons Protection //
  60. //------------------------------------------------------//
  61. //------------------------------------------------------//
  62. new tp_timer[MAX_PLAYERS]; // Teleports Protection //
  63. //------------------------------------------------------//
  64. //------------------------------------------------------//
  65. new tlp1_timer[MAX_PLAYERS]; // Save Teleport Protection #1 //
  66. new tlp2_timer[MAX_PLAYERS]; // Save Teleport Protection #2 //
  67. new tlp3_timer[MAX_PLAYERS]; // Save Teleport Protection #3 //
  68. new tlp4_timer[MAX_PLAYERS]; // Save Teleport Protection #4 //
  69. new tlp5_timer[MAX_PLAYERS]; // Save Teleport Protection #5 //
  70. new tlp6_timer[MAX_PLAYERS]; // Save Teleport Protection #6 //
  71. new tlp7_timer[MAX_PLAYERS]; // Save Teleport Protection #7 //
  72. new tlp8_timer[MAX_PLAYERS]; // Save Teleport Protection #8 //
  73. new tlp9_timer[MAX_PLAYERS]; // Save Teleport Protection #9 //
  74. new tlp10_timer[MAX_PLAYERS]; // Save Teleport Protection #10 //
  75. //--------------------------------------------------------------------//
  76. //--------------------------------------------------------------------//
  77. new tele1_timer[MAX_PLAYERS]; // Create Teleport Protection #1 //
  78. new tele2_timer[MAX_PLAYERS]; // Create Teleport Protection #2 //
  79. new tele3_timer[MAX_PLAYERS]; // Create Teleport Protection #3 //
  80. new tele4_timer[MAX_PLAYERS]; // Create Teleport Protection #4 //
  81. new tele5_timer[MAX_PLAYERS]; // Create Teleport Protection #5 //
  82. new tele6_timer[MAX_PLAYERS]; // Create Teleport Protection #6 //
  83. new tele7_timer[MAX_PLAYERS]; // Create Teleport Protection #7 //
  84. new tele8_timer[MAX_PLAYERS]; // Create Teleport Protection #8 //
  85. new tele9_timer[MAX_PLAYERS]; // Create Teleport Protection #9 //
  86. new tele10_timer[MAX_PLAYERS]; // Create Teleport Protection #10 //
  87. //--------------------------------------------------------------------//
  88. //--------------------------------------------------------------------//
  89. new Float:posX[MAX_PLAYERS]; // //
  90. new Float:posY[MAX_PLAYERS]; // //
  91. new Float:posZ[MAX_PLAYERS]; // Gang //
  92. new Float:posA[MAX_PLAYERS]; // Spawn //
  93. new Saved[MAX_PLAYERS]; // //
  94. //--------------------------------------------------------------//
  95. //--------------------------------------------------------------//
  96. new Float:posX1[MAX_PLAYERS]; // //
  97. new Float:posY1[MAX_PLAYERS]; // //
  98. new Float:posZ1[MAX_PLAYERS]; // Teleport //
  99. new Float:posA1[MAX_PLAYERS]; // #1 //
  100. new Saved1[MAX_PLAYERS]; // //
  101. //--------------------------------------------------------------//
  102. //--------------------------------------------------------------//
  103. new Float:posX2[MAX_PLAYERS]; // //
  104. new Float:posY2[MAX_PLAYERS]; // //
  105. new Float:posZ2[MAX_PLAYERS]; // Teleport //
  106. new Float:posA2[MAX_PLAYERS]; // #2 //
  107. new Saved2[MAX_PLAYERS]; // //
  108. //--------------------------------------------------------------//
  109. //--------------------------------------------------------------//
  110. new Float:posX3[MAX_PLAYERS]; // //
  111. new Float:posY3[MAX_PLAYERS]; // //
  112. new Float:posZ3[MAX_PLAYERS]; // Teleport //
  113. new Float:posA3[MAX_PLAYERS]; // #3 //
  114. new Saved3[MAX_PLAYERS]; // //
  115. //--------------------------------------------------------------//
  116. //--------------------------------------------------------------//
  117. new Float:posX4[MAX_PLAYERS]; // //
  118. new Float:posY4[MAX_PLAYERS]; // //
  119. new Float:posZ4[MAX_PLAYERS]; // Teleport //
  120. new Float:posA4[MAX_PLAYERS]; // #4 //
  121. new Saved4[MAX_PLAYERS]; // //
  122. //--------------------------------------------------------------//
  123. //--------------------------------------------------------------//
  124. new Float:posX5[MAX_PLAYERS]; // //
  125. new Float:posY5[MAX_PLAYERS]; // //
  126. new Float:posZ5[MAX_PLAYERS]; // Teleport //
  127. new Float:posA5[MAX_PLAYERS]; // #5 //
  128. new Saved5[MAX_PLAYERS]; // //
  129. //--------------------------------------------------------------//
  130. //--------------------------------------------------------------//
  131. new Float:posX6[MAX_PLAYERS]; // //
  132. new Float:posY6[MAX_PLAYERS]; // //
  133. new Float:posZ6[MAX_PLAYERS]; // Teleport //
  134. new Float:posA6[MAX_PLAYERS]; // #6 //
  135. new Saved6[MAX_PLAYERS]; // //
  136. //--------------------------------------------------------------//
  137. //--------------------------------------------------------------//
  138. new Float:posX7[MAX_PLAYERS]; // //
  139. new Float:posY7[MAX_PLAYERS]; // //
  140. new Float:posZ7[MAX_PLAYERS]; // Teleport //
  141. new Float:posA7[MAX_PLAYERS]; // #7 //
  142. new Saved7[MAX_PLAYERS]; // //
  143. //--------------------------------------------------------------//
  144. //--------------------------------------------------------------//
  145. new Float:posX8[MAX_PLAYERS]; // //
  146. new Float:posY8[MAX_PLAYERS]; // //
  147. new Float:posZ8[MAX_PLAYERS]; // Teleport //
  148. new Float:posA8[MAX_PLAYERS]; // #8 //
  149. new Saved8[MAX_PLAYERS]; // //
  150. //--------------------------------------------------------------//
  151. //--------------------------------------------------------------//
  152. new Float:posX9[MAX_PLAYERS]; // //
  153. new Float:posY9[MAX_PLAYERS]; // //
  154. new Float:posZ9[MAX_PLAYERS]; // Teleport //
  155. new Float:posA9[MAX_PLAYERS]; // #9 //
  156. new Saved9[MAX_PLAYERS]; // //
  157. //--------------------------------------------------------------//
  158. //--------------------------------------------------------------//
  159. new Float:posX10[MAX_PLAYERS]; // //
  160. new Float:posY10[MAX_PLAYERS]; // //
  161. new Float:posZ10[MAX_PLAYERS]; // Teleport //
  162. new Float:posA10[MAX_PLAYERS]; // #10 //
  163. new Saved10[MAX_PLAYERS]; // //
  164. //--------------------------------------------------------------//
  165. //--------------------------------------------------------------//
  166. new Float:posX11[MAX_PLAYERS]; // //
  167. new Float:posY11[MAX_PLAYERS]; // //
  168. new Float:posZ11[MAX_PLAYERS]; // BASE //
  169. new Float:posA11[MAX_PLAYERS]; // //
  170. new Saved11[MAX_PLAYERS]; // //
  171. //--------------------------------------------------------------//
  172. //--------------------------------------------------------------//
  173. public OnFilterScriptExit()
  174. {
  175. DestroyDynamicCP(tp1); //--------------------------------//
  176. DestroyDynamicCP(tp2); // //
  177. DestroyDynamicCP(tp3); // //
  178. DestroyDynamicCP(tp4); // //
  179. DestroyDynamicCP(tp5); // //
  180. DestroyDynamicCP(tp6); // //
  181. DestroyDynamicCP(tp7); // //
  182. DestroyDynamicCP(tp8); // //
  183. DestroyDynamicCP(tp9); // //
  184. DestroyDynamicCP(tp10); // //
  185. Delete3DTextLabel(ltp1); // //
  186. Delete3DTextLabel(ltp2); // //
  187. Delete3DTextLabel(ltp3); // //
  188. Delete3DTextLabel(ltp4); //--------------------------------//
  189. Delete3DTextLabel(ltp5); // Destroy everythink //
  190. Delete3DTextLabel(ltp6); // after reload //
  191. Delete3DTextLabel(ltp7); //--------------------------------//
  192. Delete3DTextLabel(ltp8); // //
  193. Delete3DTextLabel(ltp9); // //
  194. Delete3DTextLabel(ltp10); // //
  195. Delete3DTextLabel(textloot); // //
  196. Delete3DTextLabel(texthouse); // //
  197. DestroyDynamicPickup(hp); // //
  198. DestroyDynamicPickup(ar); // //
  199. DestroyDynamicPickup(loot); // //
  200. DestroyDynamicPickup(ghouse); // //
  201. DestroyDynamicPickup(mg); // //
  202. DestroyDynamicPickup(rk); // //
  203. DestroyDynamicPickup(mg); // //
  204. DestroyDynamicPickup(rk); //--------------------------------//
  205. return 1;
  206. }
  207. public OnPlayerCommandText(playerid, cmdtext[])
  208. {
  209. if (strcmp("/editgang", cmdtext, true, 10) == 0)
  210. {
  211. if(IsPlayerAdmin(playerid))
  212. {
  213. ShowPlayerDialog(playerid, 25 ,DIALOG_STYLE_LIST,"{FF0000}Create Gang {FFFFFF}panel","{FF0000}Set Spawn\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}Set Teleport\n{FF0000}Remove Weapons\n{FF0000}Remove Teleports\n{FF0000}Remove Pickups","Select","Close");
  214. }
  215. else
  216. {
  217. }
  218. return 1;
  219. }
  220. if (strcmp("/gang", cmdtext, true, 10) == 0)
  221. {
  222. if(Saved[playerid] == 1)
  223. {
  224. SetPlayerPos(playerid, posX[playerid], posY[playerid], posZ[playerid]),SetPlayerFacingAngle(playerid, posA[playerid]),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);
  225. }
  226. else
  227. {
  228. SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Spawn is not saved!");
  229. }
  230. return 1;
  231. }
  232. if (strcmp("/base", cmdtext, true, 10) == 0)
  233. {
  234. ShowPlayerDialog(playerid, 35 ,DIALOG_STYLE_LIST,"Editgang Base","{FFFF00}Gang Tester V2.2","Teleport","Close");
  235. return 1;
  236. }
  237. if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
  238. {
  239. if(IsPlayerAdmin(playerid))
  240. {
  241. new string[128];
  242. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  243. if(tlp1_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  244. GetPlayerPos(playerid, posX1[playerid], posY1[playerid], posZ1[playerid]),GetPlayerFacingAngle(playerid, posA1[playerid]);
  245. Saved1[playerid] = 1;
  246. tlp1_timer[playerid] = SetTimerEx("tlp1",3600000,false,"i",playerid);
  247. }
  248. else
  249. {
  250. }
  251. return 1;
  252. }
  253. if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
  254. {
  255. if(IsPlayerAdmin(playerid))
  256. {
  257. new string[128];
  258. if(tlp2_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  259. GetPlayerPos(playerid, posX2[playerid], posY2[playerid], posZ2[playerid]),GetPlayerFacingAngle(playerid, posA2[playerid]);
  260. Saved2[playerid] = 1;
  261. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  262. tlp2_timer[playerid] = SetTimerEx("tlp2",3600000,false,"i",playerid);
  263. }
  264. else
  265. {
  266. }
  267. return 1;
  268. }
  269. if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
  270. {
  271. if(IsPlayerAdmin(playerid))
  272. {
  273. new string[128];
  274. if(tlp3_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  275. GetPlayerPos(playerid, posX3[playerid], posY3[playerid], posZ3[playerid]),GetPlayerFacingAngle(playerid, posA3[playerid]);
  276. Saved3[playerid] = 1;
  277. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  278. tlp3_timer[playerid] = SetTimerEx("tlp3",3600000,false,"i",playerid);
  279. }
  280. else
  281. {
  282. }
  283. return 1;
  284. }
  285. if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
  286. {
  287. if(IsPlayerAdmin(playerid))
  288. {
  289. new string[128];
  290. if(tlp4_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  291. GetPlayerPos(playerid, posX4[playerid], posY4[playerid], posZ4[playerid]),GetPlayerFacingAngle(playerid, posA4[playerid]);
  292. Saved4[playerid] = 1;
  293. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  294. tlp4_timer[playerid] = SetTimerEx("tlp4",3600000,false,"i",playerid);
  295. }
  296. else
  297. {
  298. }
  299. return 1;
  300. }
  301. if (strcmp("/gtloc 5", cmdtext, true, 10) == 0)
  302. {
  303. if(IsPlayerAdmin(playerid))
  304. {
  305. new string[128];
  306. if(tlp5_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  307. GetPlayerPos(playerid, posX5[playerid], posY5[playerid], posZ5[playerid]),GetPlayerFacingAngle(playerid, posA5[playerid]);
  308. Saved5[playerid] = 1;
  309. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  310. tlp5_timer[playerid] = SetTimerEx("tlp5",3600000,false,"i",playerid);
  311. }
  312. else
  313. {
  314. }
  315. return 1;
  316. }
  317. if (strcmp("/gtloc 6", cmdtext, true, 10) == 0)
  318. {
  319. if(IsPlayerAdmin(playerid))
  320. {
  321. new string[128];
  322. if(tlp6_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  323. GetPlayerPos(playerid, posX6[playerid], posY6[playerid], posZ6[playerid]),GetPlayerFacingAngle(playerid, posA6[playerid]);
  324. Saved6[playerid] = 1;
  325. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  326. tlp6_timer[playerid] = SetTimerEx("tlp6",3600000,false,"i",playerid);
  327. }
  328. else
  329. {
  330. }
  331. return 1;
  332. }
  333. if (strcmp("/gtloc 7", cmdtext, true, 10) == 0)
  334. {
  335. if(IsPlayerAdmin(playerid))
  336. {
  337. new string[128];
  338. if(tlp7_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  339. GetPlayerPos(playerid, posX7[playerid], posY7[playerid], posZ7[playerid]),GetPlayerFacingAngle(playerid, posA7[playerid]);
  340. Saved7[playerid] = 1;
  341. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  342. tlp7_timer[playerid] = SetTimerEx("tlp7",3600000,false,"i",playerid);
  343. }
  344. else
  345. {
  346. }
  347. return 1;
  348. }
  349. if (strcmp("/gtloc 8", cmdtext, true, 10) == 0)
  350. {
  351. if(IsPlayerAdmin(playerid))
  352. {
  353. new string[128];
  354. if(tlp8_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  355. GetPlayerPos(playerid, posX8[playerid], posY8[playerid], posZ8[playerid]),GetPlayerFacingAngle(playerid, posA8[playerid]);
  356. Saved8[playerid] = 1;
  357. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  358. tlp8_timer[playerid] = SetTimerEx("tlp8",3600000,false,"i",playerid);
  359. }
  360. else
  361. {
  362. }
  363. return 1;
  364. }
  365. if (strcmp("/gtloc 9", cmdtext, true, 10) == 0)
  366. {
  367. if(IsPlayerAdmin(playerid))
  368. {
  369. new string[128];
  370. if(tlp9_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  371. GetPlayerPos(playerid, posX9[playerid], posY9[playerid], posZ9[playerid]),GetPlayerFacingAngle(playerid, posA9[playerid]);
  372. Saved9[playerid] = 1;
  373. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  374. tlp9_timer[playerid] = SetTimerEx("tlp9",3600000,false,"i",playerid);
  375. }
  376. else
  377. {
  378. }
  379. return 1;
  380. }
  381. if (strcmp("/gtloc 10", cmdtext, true, 10) == 0)
  382. {
  383. if(IsPlayerAdmin(playerid))
  384. {
  385. new string[128];
  386. if(tlp10_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  387. GetPlayerPos(playerid, posX10[playerid], posY10[playerid], posZ10[playerid]),GetPlayerFacingAngle(playerid, posA10[playerid]);
  388. Saved10[playerid] = 1;
  389. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  390. tlp10_timer[playerid] = SetTimerEx("tlp10",3600000,false,"i",playerid);
  391. }
  392. else
  393. {
  394. }
  395. return 1;
  396. }
  397. if (strcmp("/world", cmdtext, true, 10) == 0)
  398. {
  399. new string[32];
  400. format(string, sizeof(string), "Current World: %i", GetPlayerVirtualWorld(playerid));
  401. SendClientMessage(playerid, 0xCCCCCCCC, string);
  402. return 1;
  403. }
  404. if (strcmp("/angle", cmdtext, true, 10) == 0)
  405. {
  406. new Float:Angle, string[26];
  407. GetPlayerFacingAngle(playerid, Angle);
  408. format(string, sizeof(string), "Current Facing Angle: %0.2f", Angle);
  409. SendClientMessage(playerid, 0xCCCCCCCC, string);
  410. return 1;
  411. }
  412. return 0;
  413. }
  414. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  415. {
  416. if(pickupid == hp)
  417. {
  418. new string[128];
  419. if(heal_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  420. SetPlayerHealth(playerid,100);
  421. GameTextForPlayer(playerid, "~r~~h~Hp Filled", 2500, 3);
  422. heal_timer[playerid] = SetTimerEx("health",200000,false,"i",playerid);
  423. }
  424. if(pickupid == ar)
  425. {
  426. new string[128];
  427. if(armour_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  428. SetPlayerArmour(playerid,100);
  429. GameTextForPlayer(playerid, "~b~~h~Armour Filled", 2500, 3);
  430. armour_timer[playerid] = SetTimerEx("armour",200000,false,"i",playerid);
  431. }
  432. if(pickupid == mg)
  433. {
  434. new string[128];
  435. if(minigun_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can load this gun only once every 10 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  436. GivePlayerWeapon(playerid, 38, 50);
  437. GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
  438. minigun_timer[playerid] = SetTimerEx("minigun",1000000,false,"i",playerid);
  439. }
  440. if(pickupid == rk)
  441. {
  442. new string[128];
  443. if(rocket_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can load this gun only once every 10 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  444. GivePlayerWeapon(playerid, 35, 10);
  445. SetTimer("message", 100000, 1);
  446. GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
  447. rocket_timer[playerid] = SetTimerEx("rocket",1000000,false,"i",playerid);
  448. }
  449. if(pickupid == ghouse)
  450. {
  451. }
  452. if(pickupid == loot)
  453. {
  454. }
  455. return 1;
  456. }
  457. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  458. {
  459. if(checkpointid == tp1)
  460. {
  461. if(Saved1[playerid] == 1)
  462. SetPlayerPos(playerid, posX1[playerid], posY1[playerid], posZ1[playerid]),SetPlayerFacingAngle(playerid, posA1[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  463. }
  464. if(checkpointid == tp2)
  465. {
  466. if(Saved2[playerid] == 1)
  467. SetPlayerPos(playerid, posX2[playerid], posY2[playerid], posZ2[playerid]),SetPlayerFacingAngle(playerid, posA2[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  468. }
  469. if(checkpointid == tp3)
  470. {
  471. if(Saved3[playerid] == 1)
  472. SetPlayerPos(playerid, posX3[playerid], posY3[playerid], posZ3[playerid]),SetPlayerFacingAngle(playerid, posA3[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  473. }
  474. if(checkpointid == tp4)
  475. {
  476. if(Saved4[playerid] == 1)
  477. SetPlayerPos(playerid, posX4[playerid], posY4[playerid], posZ4[playerid]),SetPlayerFacingAngle(playerid, posA4[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  478. }
  479. if(checkpointid == tp5)
  480. {
  481. if(Saved5[playerid] == 1)
  482. SetPlayerPos(playerid, posX5[playerid], posY5[playerid], posZ5[playerid]),SetPlayerFacingAngle(playerid, posA5[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  483. }
  484. if(checkpointid == tp6)
  485. {
  486. if(Saved6[playerid] == 1)
  487. SetPlayerPos(playerid, posX6[playerid], posY6[playerid], posZ6[playerid]),SetPlayerFacingAngle(playerid, posA6[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  488. }
  489. if(checkpointid == tp7)
  490. {
  491. if(Saved7[playerid] == 1)
  492. SetPlayerPos(playerid, posX7[playerid], posY7[playerid], posZ7[playerid]),SetPlayerFacingAngle(playerid, posA7[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  493. }
  494. if(checkpointid == tp8)
  495. {
  496. if(Saved8[playerid] == 1)
  497. SetPlayerPos(playerid, posX8[playerid], posY8[playerid], posZ8[playerid]),SetPlayerFacingAngle(playerid, posA8[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  498. }
  499. if(checkpointid == tp9)
  500. {
  501. if(Saved9[playerid] == 1)
  502. SetPlayerPos(playerid, posX9[playerid], posY9[playerid], posZ9[playerid]),SetPlayerFacingAngle(playerid, posA9[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  503. }
  504. if(checkpointid == tp10)
  505. {
  506. if(Saved10[playerid] == 1)
  507. SetPlayerPos(playerid, posX10[playerid], posY10[playerid], posZ10[playerid]),SetPlayerFacingAngle(playerid, posA10[playerid]),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
  508. }
  509. return 1;
  510. }
  511.  
  512. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  513. {
  514. if(dialogid == 25)
  515. {
  516. if(response)
  517. {
  518. if(listitem == 0)
  519. {
  520. GetPlayerPos(playerid, posX[playerid], posY[playerid], posZ[playerid]),GetPlayerFacingAngle(playerid, posA[playerid]);
  521. Saved[playerid] = 1;
  522. SendClientMessage(playerid, 0x00CC3300, "SERVER: Spawn was successfully set!");
  523. }
  524. if(listitem == 1)
  525. {
  526. Delete3DTextLabel(texthouse);
  527. DestroyDynamicPickup(ghouse);
  528. new Float:x1, Float:y1, Float:z1;
  529. GetPlayerPos(playerid, x1, y1, z1);
  530. ghouse = CreateDynamicPickup(1239, 1, x1, y1, z1, -1);
  531. texthouse = Create3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, x1, y1, z1, 25.0, 0);
  532. SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang House was successfully set!");
  533. }
  534. if(listitem == 2)
  535. {
  536. if(base_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Base can by set only once!");
  537. GetPlayerPos(playerid, posX11[playerid], posY11[playerid], posZ11[playerid]),GetPlayerFacingAngle(playerid, posA11[playerid]);
  538. Saved11[playerid] = 1;
  539. SendClientMessage(playerid, 0x00CC3300, "SERVER: Base was successfully set!");
  540. base_timer[playerid] = SetTimerEx("base",3600000,false,"i",playerid);
  541. }
  542. if(listitem == 3)
  543. {
  544. Delete3DTextLabel(textloot);
  545. DestroyDynamicPickup(loot);
  546. new Float:x, Float:y, Float:z;
  547. GetPlayerPos(playerid, x, y, z);
  548. loot = CreateDynamicPickup(1550, 1, x, y, z, -1);
  549. textloot = Create3DTextLabel("{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, 0);
  550. SendClientMessage(playerid, 0x00CC3300, "SERVER: Loot was successfully set!");
  551. }
  552. if(listitem == 4)
  553. {
  554. DestroyDynamicPickup(hp);
  555. new Float:x, Float:y, Float:z;
  556. GetPlayerPos(playerid, x, y, z);
  557. hp = CreateDynamicPickup(1240, 1, x, y, z, -1);
  558. SendClientMessage(playerid, 0x00CC3300, "SERVER: Health was successfully set!");
  559. }
  560. if(listitem == 5)
  561. {
  562. DestroyDynamicPickup(ar);
  563. new Float:x, Float:y, Float:z;
  564. GetPlayerPos(playerid, x, y, z);
  565. ar = CreateDynamicPickup(1242, 1, x, y, z, -1);
  566. SendClientMessage(playerid, 0x00CC3300, "SERVER: Armour was successfully set!");
  567. }
  568. if(listitem == 6)
  569. {
  570. DestroyDynamicPickup(mg);
  571. new Float:x, Float:y, Float:z;
  572. GetPlayerPos(playerid, x, y, z);
  573. mg = CreateDynamicPickup(362, 1, x, y, z, -1);
  574. SendClientMessage(playerid, 0x00CC3300, "SERVER: Minigun was successfully set!");
  575. }
  576. if(listitem == 7)
  577. {
  578. DestroyDynamicPickup(rk);
  579. new Float:x, Float:y, Float:z;
  580. GetPlayerPos(playerid, x, y, z);
  581. rk = CreateDynamicPickup(359, 1, x, y, z, -1);
  582. SendClientMessage(playerid, 0x00CC3300, "SERVER: Rocket was successfully set!");
  583. }
  584. if(listitem == 8)
  585. {
  586. ShowPlayerDialog(playerid, 40 ,DIALOG_STYLE_LIST ,"{FF0000}Set Teleport","{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");
  587. }
  588. if(listitem == 9)
  589. {
  590. if(wp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Weapons are not created!");
  591. DestroyDynamicPickup(mg);
  592. DestroyDynamicPickup(rk);
  593. SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Weapons are successfully removed!");
  594. wp_timer[playerid] = SetTimerEx("weapons",3600000,false,"i",playerid);
  595. }
  596. if(listitem == 10)
  597. {
  598. if(tp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports are not created!");
  599. DestroyDynamicCP(tp1);
  600. DestroyDynamicCP(tp2);
  601. DestroyDynamicCP(tp3);
  602. DestroyDynamicCP(tp4);
  603. DestroyDynamicCP(tp5);
  604. DestroyDynamicCP(tp6);
  605. DestroyDynamicCP(tp7);
  606. DestroyDynamicCP(tp8);
  607. DestroyDynamicCP(tp9);
  608. DestroyDynamicCP(tp10);
  609. Delete3DTextLabel(ltp1);
  610. Delete3DTextLabel(ltp2);
  611. Delete3DTextLabel(ltp3);
  612. Delete3DTextLabel(ltp4);
  613. Delete3DTextLabel(ltp5);
  614. Delete3DTextLabel(ltp6);
  615. Delete3DTextLabel(ltp7);
  616. Delete3DTextLabel(ltp8);
  617. Delete3DTextLabel(ltp9);
  618. Delete3DTextLabel(ltp10);
  619. SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleports are successfully removed!");
  620. tp_timer[playerid] = SetTimerEx("teleports",3600000,false,"i",playerid);
  621. }
  622. if(listitem == 11)
  623. {
  624. if(rp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Pickups are not created!");
  625. Delete3DTextLabel(textloot);
  626. Delete3DTextLabel(texthouse);
  627. DestroyDynamicPickup(hp);
  628. DestroyDynamicPickup(ar);
  629. DestroyDynamicPickup(loot);
  630. DestroyDynamicPickup(ghouse);
  631. SendClientMessage(playerid, 0x00CC3300, "SERVER: Pickups are successfully removed!");
  632. rp_timer[playerid] = SetTimerEx("pickups",3600000,false,"i",playerid);
  633. }
  634. }
  635. return 1;
  636. }
  637. if(dialogid == 35)
  638. {
  639. if(response)
  640. {
  641. if(Saved11[playerid] == 1)
  642. {
  643. SetPlayerPos(playerid, posX11[playerid], posY11[playerid], posZ11[playerid]),SetPlayerFacingAngle(playerid, posA11[playerid]),SetCameraBehindPlayer(playerid),GameTextForPlayer(playerid,"~g~~h~Teleported",2000,3);
  644. }
  645. else
  646. {
  647. SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Base is not saved!");
  648. }
  649. }
  650. return 1;
  651. }
  652. if(dialogid == 10)
  653. {
  654. if(response)
  655. {
  656. if(tele1_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  657. new Float:x,Float:y,Float:z;
  658. GetPlayerPos(playerid,x,y,z);
  659. tp1 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  660. ltp1 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  661. Update3DTextLabelText(ltp1, -1, inputtext);
  662. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 1 to save checkpoint direction!");
  663. tele1_timer[playerid] = SetTimerEx("tp1",3600000,false,"i",playerid);
  664. }
  665. return 1;
  666. }
  667. if(dialogid == 11)
  668. {
  669. if(response)
  670. {
  671. if(tele2_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  672. new Float:x,Float:y,Float:z;
  673. GetPlayerPos(playerid,x,y,z);
  674. tp2 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  675. ltp2 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  676. Update3DTextLabelText(ltp2, -1, inputtext);
  677. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 2 to save checkpoint direction!");
  678. tele2_timer[playerid] = SetTimerEx("tp2",3600000,false,"i",playerid);
  679. }
  680. return 1;
  681. }
  682. if(dialogid == 12)
  683. {
  684. if(response)
  685. {
  686. if(tele3_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  687. new Float:x,Float:y,Float:z;
  688. GetPlayerPos(playerid,x,y,z);
  689. tp3 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  690. ltp3 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  691. Update3DTextLabelText(ltp3, -1, inputtext);
  692. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 3 to save checkpoint direction!");
  693. tele3_timer[playerid] = SetTimerEx("tp3",3600000,false,"i",playerid);
  694. }
  695. return 1;
  696. }
  697. if(dialogid == 13)
  698. {
  699. if(response)
  700. {
  701. if(tele4_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  702. new Float:x,Float:y,Float:z;
  703. GetPlayerPos(playerid,x,y,z);
  704. tp4 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  705. ltp4 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  706. Update3DTextLabelText(ltp4, -1, inputtext);
  707. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 4 to save checkpoint direction!");
  708. tele4_timer[playerid] = SetTimerEx("tp4",3600000,false,"i",playerid);
  709. }
  710. return 1;
  711. }
  712. if(dialogid == 14)
  713. {
  714. if(response)
  715. {
  716. if(tele5_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  717. new Float:x,Float:y,Float:z;
  718. GetPlayerPos(playerid,x,y,z);
  719. tp5 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  720. ltp5 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  721. Update3DTextLabelText(ltp5, -1, inputtext);
  722. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 5 to save checkpoint direction!");
  723. tele5_timer[playerid] = SetTimerEx("tp5",3600000,false,"i",playerid);
  724. }
  725. return 1;
  726. }
  727. if(dialogid == 15)
  728. {
  729. if(response)
  730. {
  731. if(tele6_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  732. new Float:x,Float:y,Float:z;
  733. GetPlayerPos(playerid,x,y,z);
  734. tp6 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  735. ltp6 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  736. Update3DTextLabelText(ltp6, -1, inputtext);
  737. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 6 to save checkpoint direction!");
  738. tele6_timer[playerid] = SetTimerEx("tp6",3600000,false,"i",playerid);
  739. }
  740. return 1;
  741. }
  742. if(dialogid == 16)
  743. {
  744. if(response)
  745. {
  746. if(tele7_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  747. new Float:x,Float:y,Float:z;
  748. GetPlayerPos(playerid,x,y,z);
  749. tp7 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  750. ltp7 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  751. Update3DTextLabelText(ltp7, -1, inputtext);
  752. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 7 to save checkpoint direction!");
  753. tele7_timer[playerid] = SetTimerEx("tp7",3600000,false,"i",playerid);
  754. }
  755. return 1;
  756. }
  757. if(dialogid == 17)
  758. {
  759. if(response)
  760. {
  761. if(tele8_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  762. new Float:x,Float:y,Float:z;
  763. GetPlayerPos(playerid,x,y,z);
  764. tp8 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  765. ltp8 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  766. Update3DTextLabelText(ltp8, -1, inputtext);
  767. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 8 to save checkpoint direction!");
  768. tele8_timer[playerid] = SetTimerEx("tp8",3600000,false,"i",playerid);
  769. }
  770. return 1;
  771. }
  772. if(dialogid == 18)
  773. {
  774. if(response)
  775. {
  776. if(tele9_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  777. new Float:x,Float:y,Float:z;
  778. GetPlayerPos(playerid,x,y,z);
  779. tp9 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  780. ltp9 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  781. Update3DTextLabelText(ltp9, -1, inputtext);
  782. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 9 to save checkpoint direction!");
  783. tele9_timer[playerid] = SetTimerEx("tp9",3600000,false,"i",playerid);
  784. }
  785. return 1;
  786. }
  787. if(dialogid == 19)
  788. {
  789. if(response)
  790. {
  791. if(tele10_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
  792. new Float:x,Float:y,Float:z;
  793. GetPlayerPos(playerid,x,y,z);
  794. tp10 = CreateDynamicCP(x, y, z-0.85, 1, -1, -1, -1, 15, -1, 0);
  795. ltp10 = Create3DTextLabel("", -1, x, y, z, 15, 0);
  796. Update3DTextLabelText(ltp10, -1, inputtext);
  797. SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 10 to save checkpoint direction!");
  798. tele10_timer[playerid] = SetTimerEx("tp10",3600000,false,"i",playerid);
  799. }
  800. return 1;
  801. }
  802. if(dialogid == 40)
  803. {
  804. if(response)
  805. {
  806. if(listitem == 0)
  807. {
  808. ShowPlayerDialog(playerid, 10 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  809. }
  810. else if(listitem == 1)
  811. {
  812. ShowPlayerDialog(playerid, 11 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  813. }
  814. else if(listitem == 2)
  815. {
  816. ShowPlayerDialog(playerid, 12 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  817. }
  818. else if(listitem == 3)
  819. {
  820. ShowPlayerDialog(playerid, 13 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  821. }
  822. else if(listitem == 4)
  823. {
  824. ShowPlayerDialog(playerid, 14 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  825. }
  826. else if(listitem == 5)
  827. {
  828. ShowPlayerDialog(playerid, 15 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  829. }
  830. else if(listitem == 6)
  831. {
  832. ShowPlayerDialog(playerid, 16 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  833. }
  834. else if(listitem == 7)
  835. {
  836. ShowPlayerDialog(playerid, 17 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  837. }
  838. else if(listitem == 8)
  839. {
  840. ShowPlayerDialog(playerid, 18 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  841. }
  842. else if(listitem == 9)
  843. {
  844. ShowPlayerDialog(playerid, 19 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  845. }
  846. }
  847. return 1;
  848. }
  849. return 0;
  850. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement