SHARE
TWEET

Gang Future

a guest Nov 25th, 2018 151 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include    <a_samp>
  2. #include    <streamer>
  3. #include    <lfuncs>
  4. #include    <ldudb>
  5. #define     GANG            1
  6. #define     TELEPORTS       2
  7. #define     TERRITORY       3
  8. #define     CHECKPOINTS     4
  9.  
  10. new Text3D:ltp1;
  11. new Text3D:ltp2;
  12. new Text3D:ltp3;
  13. new Text3D:ltp4;
  14. new Text3D:ltp5;
  15. new Text3D:tcp1;
  16. new Text3D:tcp2;
  17. new Text3D:tloot;
  18. new Text3D:thouse;
  19. new tp1;
  20. new tp2;
  21. new tp3;
  22. new tp4;
  23. new tp5;
  24. new hp;
  25. new ar;
  26. new mg;
  27. new rk;
  28. new loot;
  29. new ghouse;
  30. new t1;
  31. new t2;
  32. new t3;
  33. new t4;
  34. new cp1;
  35. new cp2;
  36. new spawn_timer[MAX_PLAYERS];
  37. new minigun_timer[MAX_PLAYERS];
  38. new rocket_timer[MAX_PLAYERS];
  39. new heal_timer[MAX_PLAYERS];
  40. new armour_timer[MAX_PLAYERS];
  41. new ghouse_timer[MAX_PLAYERS];
  42. new loot_timer[MAX_PLAYERS];
  43. new hp_timer[MAX_PLAYERS];
  44. new ar_timer[MAX_PLAYERS];
  45. new mg_timer[MAX_PLAYERS];
  46. new rk_timer[MAX_PLAYERS];
  47. new rp_timer[MAX_PLAYERS];
  48. new tr_timer[MAX_PLAYERS];
  49. new tlp1_timer[MAX_PLAYERS];
  50. new tlp2_timer[MAX_PLAYERS];
  51. new tlp3_timer[MAX_PLAYERS];
  52. new tlp4_timer[MAX_PLAYERS];
  53. new tlp5_timer[MAX_PLAYERS];
  54. new cp1_timer[MAX_PLAYERS];
  55. new cp2_timer[MAX_PLAYERS];
  56. new tele1_timer[MAX_PLAYERS];
  57. new tele2_timer[MAX_PLAYERS];
  58. new tele3_timer[MAX_PLAYERS];
  59. new tele4_timer[MAX_PLAYERS];
  60. new tele5_timer[MAX_PLAYERS];
  61. new tcp1_timer[MAX_PLAYERS];
  62. new tcp2_timer[MAX_PLAYERS];
  63.  
  64. public OnFilterScriptExit()
  65. {
  66.     DestroyDynamicCP(tp1);
  67.     DestroyDynamicCP(tp2);
  68.     DestroyDynamicCP(tp3);
  69.     DestroyDynamicCP(tp4);
  70.     DestroyDynamicCP(tp5);
  71.     DestroyDynamicCP(cp1);
  72.     DestroyDynamicCP(cp2);
  73.     Delete3DTextLabel(ltp1);
  74.     Delete3DTextLabel(ltp2);
  75.     Delete3DTextLabel(ltp3);
  76.     Delete3DTextLabel(ltp4);
  77.     Delete3DTextLabel(ltp5);
  78.     Delete3DTextLabel(tloot);
  79.     Delete3DTextLabel(thouse);
  80.     Delete3DTextLabel(tcp1);
  81.     Delete3DTextLabel(tcp2);
  82.     DestroyDynamicPickup(hp);
  83.     DestroyDynamicPickup(ar);
  84.     DestroyDynamicPickup(loot);
  85.     DestroyDynamicPickup(ghouse);
  86.     DestroyDynamicPickup(mg);
  87.     DestroyDynamicPickup(rk);
  88.     DestroyDynamicPickup(mg);
  89.     DestroyDynamicPickup(rk);
  90.     DestroyDynamicMapIcon(t1);
  91.     DestroyDynamicMapIcon(t2);
  92.     DestroyDynamicMapIcon(t3);
  93.     DestroyDynamicMapIcon(t4);
  94.     return 1;
  95. }
  96.  
  97. public OnPlayerCommandText(playerid, cmdtext[])
  98. {
  99.     if (strcmp("/editgang", cmdtext, true, 10) == 0)
  100.     {
  101.     if(IsPlayerAdmin(playerid))
  102.     {
  103.     ShowPlayerDialog(playerid, GANG ,DIALOG_STYLE_LIST,"{FF0000}Create Gang {FFFFFF}panel","{FF0000}Set Spawn\n{FF0000}Set Teleport\n{FF0000}Set Gang House\n{FF0000}Set Loot\n{FF0000}Set Health\n{FF0000}Set Armour\n{FF0000}Set Minigun\n{FF0000}Set Rocket\n{FF0000}Set Territory\n{FF0000}Set Checkpoint\n{FF0000}Remove Features","Select","Close");
  104.     }
  105.     else
  106.     {
  107.     }
  108.     return 1;
  109. }
  110.     if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
  111.     {
  112.     new string[128];
  113.     new Float:x10,Float:y10,Float:z10;
  114.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  115.     if(tlp1_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  116.     GetPlayerPos(playerid,x10,y10,z10);
  117.     dUserSetINT(PlayerName2(playerid)).("x10",floatround(x10));
  118.     dUserSetINT(PlayerName2(playerid)).("y10",floatround(y10));
  119.     dUserSetINT(PlayerName2(playerid)).("z10",floatround(z10));
  120.     tlp1_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  121.     return 1;
  122. }
  123.     if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
  124.     {
  125.     new string[128];
  126.     new Float:x11,Float:y11,Float:z11;
  127.     if(tlp2_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  128.     GetPlayerPos(playerid,x11,y11,z11);
  129.     dUserSetINT(PlayerName2(playerid)).("x11",floatround(x11));
  130.     dUserSetINT(PlayerName2(playerid)).("y11",floatround(y11));
  131.     dUserSetINT(PlayerName2(playerid)).("z11",floatround(z11));
  132.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  133.     tlp2_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  134.     return 1;
  135. }
  136.     if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
  137.     {
  138.     new string[128];
  139.     new Float:x12,Float:y12,Float:z12;
  140.     if(tlp3_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  141.     GetPlayerPos(playerid,x12,y12,z12);
  142.     dUserSetINT(PlayerName2(playerid)).("x12",floatround(x12));
  143.     dUserSetINT(PlayerName2(playerid)).("y12",floatround(y12));
  144.     dUserSetINT(PlayerName2(playerid)).("z12",floatround(z12));
  145.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  146.     tlp3_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  147.     return 1;
  148. }
  149.     if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
  150.     {
  151.     new string[128];
  152.     new Float:x13,Float:y13,Float:z13;
  153.     if(tlp4_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  154.     GetPlayerPos(playerid,x13,y13,z13);
  155.     dUserSetINT(PlayerName2(playerid)).("x13",floatround(x13));
  156.     dUserSetINT(PlayerName2(playerid)).("y13",floatround(y13));
  157.     dUserSetINT(PlayerName2(playerid)).("z13",floatround(z13));
  158.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  159.     tlp4_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  160.     return 1;
  161. }
  162.     if (strcmp("/gtloc 5", cmdtext, true, 10) == 0)
  163.     {
  164.     new string[128];
  165.     new Float:x14,Float:y14,Float:z14;
  166.     GetPlayerPos(playerid,x14,y14,z14);
  167.     if(tlp5_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  168.     dUserSetINT(PlayerName2(playerid)).("x14",floatround(x14));
  169.     dUserSetINT(PlayerName2(playerid)).("y14",floatround(y14));
  170.     dUserSetINT(PlayerName2(playerid)).("z14",floatround(z14));
  171.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  172.     tlp5_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  173.     return 1;
  174. }
  175.     if (strcmp("/gtloc 6", cmdtext, true, 10) == 0)
  176.     {
  177.     new string[128];
  178.     new Float:x15,Float:y15,Float:z15;
  179.     GetPlayerPos(playerid,x15,y15,z15);
  180.     if(cp1_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  181.     dUserSetINT(PlayerName2(playerid)).("x15",floatround(x15));
  182.     dUserSetINT(PlayerName2(playerid)).("y15",floatround(y15));
  183.     dUserSetINT(PlayerName2(playerid)).("z15",floatround(z15));
  184.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  185.     cp1_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  186.     return 1;
  187. }
  188.     if (strcmp("/gtloc 7", cmdtext, true, 10) == 0)
  189.     {
  190.     new string[128];
  191.     new Float:x16,Float:y16,Float:z16;
  192.     GetPlayerPos(playerid,x16,y16,z16);
  193.     if(cp2_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  194.     dUserSetINT(PlayerName2(playerid)).("x16",floatround(x16));
  195.     dUserSetINT(PlayerName2(playerid)).("y16",floatround(y16));
  196.     dUserSetINT(PlayerName2(playerid)).("z16",floatround(z16));
  197.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  198.     cp2_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  199.     return 1;
  200. }
  201.     return 0;
  202. }
  203.  
  204. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  205. {
  206.     if(pickupid == hp)
  207.     {
  208.     new string[128];
  209.     if(heal_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  210.     SetPlayerHealth(playerid,100);
  211.     GameTextForPlayer(playerid, "~r~~h~Hp Filled", 2500, 3);
  212.     heal_timer[playerid] = SetTimerEx("heal",200000,false,"i",playerid);
  213.     }
  214.     if(pickupid == ar)
  215.     {
  216.     new string[128];
  217.     if(armour_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  218.     SetPlayerArmour(playerid,100);
  219.     GameTextForPlayer(playerid, "~b~~h~Armour Filled", 2500, 3);
  220.     armour_timer[playerid] = SetTimerEx("armour",200000,false,"i",playerid);
  221.     }
  222.     if(pickupid == mg)
  223.     {
  224.     new string[128];
  225.     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);
  226.     GivePlayerWeapon(playerid, 38, 50);
  227.     GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
  228.     minigun_timer[playerid] = SetTimerEx("Minigun",1000000,false,"i",playerid);
  229.     }
  230.     if(pickupid == rk)
  231.     {
  232.     new string[128];
  233.     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);
  234.     GivePlayerWeapon(playerid, 35, 10);
  235.     SetTimer("message", 100000, 1);
  236.     GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
  237.     rocket_timer[playerid] = SetTimerEx("Rocket",1000000,false,"i",playerid);
  238.     }
  239.     if(pickupid == ghouse)
  240.     {
  241.     }
  242.     if(pickupid == loot)
  243.     {
  244.     }
  245.     return 1;
  246. }
  247.  
  248. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  249. {
  250.     if(checkpointid == tp1)
  251.     {
  252.     if (dUserINT(PlayerName2(playerid)).("x10")!=0)
  253.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x10")),float(dUserINT(PlayerName2(playerid)).("y10")),float(dUserINT(PlayerName2(playerid)).("z10")));
  254.     }
  255.     if(checkpointid == tp2)
  256.     {
  257.     if (dUserINT(PlayerName2(playerid)).("x11")!=0)
  258.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x11")),float(dUserINT(PlayerName2(playerid)).("y11")),float(dUserINT(PlayerName2(playerid)).("z11")));
  259.     }
  260.     if(checkpointid == tp3)
  261.     {
  262.     if (dUserINT(PlayerName2(playerid)).("x12")!=0)
  263.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x12")),float(dUserINT(PlayerName2(playerid)).("y12")),float(dUserINT(PlayerName2(playerid)).("z12")));
  264.     }
  265.     if(checkpointid == tp4)
  266.     {
  267.     if (dUserINT(PlayerName2(playerid)).("x13")!=0)
  268.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x13")),float(dUserINT(PlayerName2(playerid)).("y13")),float(dUserINT(PlayerName2(playerid)).("z13")));
  269.     }
  270.     if(checkpointid == tp5)
  271.     {
  272.     if (dUserINT(PlayerName2(playerid)).("x14")!=0)
  273.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x14")),float(dUserINT(PlayerName2(playerid)).("y14")),float(dUserINT(PlayerName2(playerid)).("z14")));
  274.     }
  275.     if(checkpointid == cp1)
  276.     {
  277.     if (dUserINT(PlayerName2(playerid)).("x15")!=0)
  278.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x15")),float(dUserINT(PlayerName2(playerid)).("y15")),float(dUserINT(PlayerName2(playerid)).("z15")));
  279.     }
  280.     if(checkpointid == cp2)
  281.     {
  282.     if (dUserINT(PlayerName2(playerid)).("x16")!=0)
  283.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x16")),float(dUserINT(PlayerName2(playerid)).("y16")),float(dUserINT(PlayerName2(playerid)).("z16")));
  284.     }
  285.     return 1;
  286. }
  287.  
  288. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  289. {
  290.     if(dialogid ==  GANG)
  291.     {
  292.         if(response)
  293.         {
  294.             if(listitem == 0)
  295.             {
  296.             if(spawn_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang House can by set only once!");
  297.             new Float:x20,Float:y20,Float:z20;
  298.             GetPlayerPos(playerid,x20,y20,z20);
  299.             dUserSetINT(PlayerName2(playerid)).("x20",floatround(x20));
  300.             dUserSetINT(PlayerName2(playerid)).("y20",floatround(y20));
  301.             dUserSetINT(PlayerName2(playerid)).("z20",floatround(z20));
  302.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Spawn was successfully set! - Press Key Number 1 from Nunpad to teleport at the saved spawn!");
  303.             spawn_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  304.             }
  305.             if(listitem == 1)
  306.             {
  307.             ShowPlayerDialog(playerid, TELEPORTS ,DIALOG_STYLE_LIST ,"{FF0000}Create Teleport","{FF0000}Teleport #1\n{FF0000}Teleport #2\n{FF0000}Teleport #3\n{FF0000}Teleport #4\n{FF0000}Teleport #5","Select","Close");
  308.             }
  309.             if(listitem == 2)
  310.             {
  311.             if(ghouse_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang House can by set only once!");
  312.             new Float:x, Float:y, Float:z;
  313.             GetPlayerPos(playerid, x, y, z);
  314.             ghouse = CreateDynamicPickup(1239, 1, x, y, z, -1);
  315.             thouse = Create3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, x, y, z, 20.0, 0);
  316.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang House was successfully set!");
  317.             ghouse_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  318.             }
  319.             if(listitem == 3)
  320.             {
  321.             if(loot_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Loot can by set only once!");
  322.             new Float:x, Float:y, Float:z;
  323.             GetPlayerPos(playerid, x, y, z);
  324.             loot = CreateDynamicPickup(1550, 1, x, y, z, -1);
  325.             tloot = Create3DTextLabel("{CC9900}Gang Loot \n{FFFFFF}Money: {FF0000}999999999{FFFFFF}, Coins: {FF0000}123456789{FFFFFF}, Gems: {FF0000}1337\n{FFFFFF}/loot", -1, x, y, z, 20.0, 0);
  326.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Loot was successfully set!");
  327.             loot_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  328.             }
  329.             if(listitem == 4)
  330.             {
  331.             if(hp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Health can by set only once!");
  332.             new Float:x, Float:y, Float:z;
  333.             GetPlayerPos(playerid, x, y, z);
  334.             hp = CreateDynamicPickup(1240, 1, x, y, z, -1);
  335.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Health was successfully set!");
  336.             hp_timer[playerid] = SetTimerEx("Health",3600000,false,"i",playerid);
  337.             }
  338.             if(listitem == 5)
  339.             {
  340.             if(ar_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Armour can by set only once!");
  341.             new Float:x, Float:y, Float:z;
  342.             GetPlayerPos(playerid, x, y, z);
  343.             ar = CreateDynamicPickup(1242, 1, x, y, z, -1);
  344.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Armour was successfully set!");
  345.             ar_timer[playerid] = SetTimerEx("Armour",3600000,false,"i",playerid);
  346.             }
  347.             if(listitem == 6)
  348.             {
  349.             if(mg_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Minigun can by set only once!");
  350.             new Float:x, Float:y, Float:z;
  351.             GetPlayerPos(playerid, x, y, z);
  352.             mg = CreateDynamicPickup(362, 1, x, y, z, -1);
  353.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Minigun was successfully set!");
  354.             mg_timer[playerid] = SetTimerEx("Minigun",3600000,false,"i",playerid);
  355.             }
  356.             if(listitem == 7)
  357.             {
  358.             if(rk_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Rocket can by set only once!");
  359.             new Float:x, Float:y, Float:z;
  360.             GetPlayerPos(playerid, x, y, z);
  361.             rk = CreateDynamicPickup(359, 1, x, y, z, -1);
  362.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Rocket was successfully set!");
  363.             rk_timer[playerid] = SetTimerEx("Rocket",3600000,false,"i",playerid);
  364.             }
  365.             if(listitem == 8)
  366.             {
  367.             ShowPlayerDialog(playerid, TERRITORY ,DIALOG_STYLE_LIST,"{FF0000}Territory Color","{00FFFF}Light Blue\n{FF6600}Orange\n{005AFF}Blue\n{008800}Green\n\n{FF0000}\t\tInformation","Select","Close");
  368.             }
  369.             if(listitem == 9)
  370.             {
  371.             ShowPlayerDialog(playerid, CHECKPOINTS ,DIALOG_STYLE_LIST,"{FF0000}Creator Checkpoint","{FF0000}Checkpoint #1\n{FF0000}Checkpoint #2","Select","Close");
  372.             }
  373.             if(listitem == 10)
  374.             {
  375.             if(rp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Pickups are not created!");
  376.             DestroyDynamicCP(tp1);
  377.             DestroyDynamicCP(tp2);
  378.             DestroyDynamicCP(tp3);
  379.             DestroyDynamicCP(tp4);
  380.             DestroyDynamicCP(tp5);
  381.             DestroyDynamicCP(cp1);
  382.             DestroyDynamicCP(cp2);
  383.             Delete3DTextLabel(ltp1);
  384.             Delete3DTextLabel(ltp2);
  385.             Delete3DTextLabel(ltp3);
  386.             Delete3DTextLabel(ltp4);
  387.             Delete3DTextLabel(ltp5);
  388.             Delete3DTextLabel(tcp1);
  389.             Delete3DTextLabel(tcp2);
  390.             Delete3DTextLabel(tloot);
  391.             Delete3DTextLabel(thouse);
  392.             DestroyDynamicPickup(hp);
  393.             DestroyDynamicPickup(ar);
  394.             DestroyDynamicPickup(loot);
  395.             DestroyDynamicPickup(ghouse);
  396.             DestroyDynamicPickup(mg);
  397.             DestroyDynamicPickup(rk);
  398.             DestroyDynamicPickup(mg);
  399.             DestroyDynamicPickup(rk);
  400.             DestroyDynamicMapIcon(t1);
  401.             DestroyDynamicMapIcon(t2);
  402.             DestroyDynamicMapIcon(t3);
  403.             DestroyDynamicMapIcon(t4);
  404.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Features are successfully removed!");
  405.             rp_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  406.             }
  407.         }
  408.         return 1;
  409.     }
  410.     if(dialogid == TELEPORTS)
  411.     {
  412.     if(response)
  413.         {
  414.             if(listitem == 0)
  415.             {
  416.             if(tele1_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  417.             new Float:x,Float:y,Float:z;
  418.             GetPlayerPos(playerid,x,y,z);
  419.             tp1 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  420.             ltp1 = Create3DTextLabel("Health", -1, x, y, z, 15, 0);
  421.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 1 to save checkpoint direction!");
  422.             tele1_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  423.             }
  424.             if(listitem == 1)
  425.             {
  426.             if(tele2_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  427.             new Float:x,Float:y,Float:z;
  428.             GetPlayerPos(playerid,x,y,z);
  429.             tp2 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  430.             ltp2 = Create3DTextLabel("Base", -1, x, y, z, 15, 0);
  431.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 2 to save checkpoint direction!");
  432.             tele2_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  433.             }
  434.             if(listitem == 2)
  435.             {
  436.             if(tele3_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  437.             new Float:x,Float:y,Float:z;
  438.             GetPlayerPos(playerid,x,y,z);
  439.             tp3 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  440.             ltp3 = Create3DTextLabel("Defense", -1, x, y, z, 15, 0);
  441.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 3 to save checkpoint direction!");
  442.             tele3_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  443.             }
  444.             if(listitem == 3)
  445.             {
  446.             if(tele4_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  447.             new Float:x,Float:y,Float:z;
  448.             GetPlayerPos(playerid,x,y,z);
  449.             tp4 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  450.             ltp4 = Create3DTextLabel("Sniper", -1, x, y, z, 15, 0);
  451.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 4 to save checkpoint direction!");
  452.             tele4_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  453.             }
  454.             if(listitem == 4)
  455.             {
  456.             if(tele5_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  457.             new Float:x,Float:y,Float:z;
  458.             GetPlayerPos(playerid,x,y,z);
  459.             tp5 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  460.             ltp5 = Create3DTextLabel("Gate", -1, x, y, z, 15, 0);
  461.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 5 to save checkpoint direction!");
  462.             tele5_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  463.             }
  464.         }
  465.     return 1;
  466.     }
  467.     if(dialogid == CHECKPOINTS)
  468.     {
  469.     if(response)
  470.         {
  471.             if(listitem == 0)
  472.             {
  473.             if(tcp1_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Checkpoints can be set only once!");
  474.             new Float:x,Float:y,Float:z;
  475.             GetPlayerPos(playerid,x,y,z);
  476.             tcp1 = Create3DTextLabel("Enter", -1, x, y, z, 15, 0);
  477.             cp1 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  478.             SendClientMessage(playerid,0x00CC3300, "SERVER: Checkpoint createad! - Use /gtloc 6 to save checkpoint direction!");
  479.             tcp1_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  480.             }
  481.             if(listitem == 1)
  482.             {
  483.             if(tcp2_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Checkpoints can be set only once!");
  484.             new Float:x,Float:y,Float:z;
  485.             GetPlayerPos(playerid,x,y,z);
  486.             tcp2 = Create3DTextLabel("Exit", -1, x, y, z, 15, 0);
  487.             cp2 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  488.             SendClientMessage(playerid,0x00CC3300, "SERVER: Checkpoint createad! - Use /gtloc 7 to save checkpoint direction!");
  489.             tcp2_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  490.             }
  491.         }
  492.     return 1;
  493.     }
  494.     if(dialogid == TERRITORY)
  495.     {
  496.         if(response)
  497.         {
  498.             if(listitem == 0)
  499.             {
  500.             if(tr_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Territory can by set only once!");
  501.             new Float:x, Float:y, Float:z;
  502.             GetPlayerPos(playerid, x, y, z);
  503.             t1 = CreateDynamicMapIcon(x, y, z, 58, -1, -1, -1, -1, 100, MAPICON_GLOBAL, -1, 0);
  504.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Territory is successfully created!");
  505.             tr_timer[playerid] = SetTimerEx("Territory",3600000,false,"i",playerid);
  506.             }
  507.             if(listitem == 1)
  508.             {
  509.             if(tr_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Territory can by set only once!");
  510.             new Float:x, Float:y, Float:z;
  511.             GetPlayerPos(playerid, x, y, z);
  512.             t2 = CreateDynamicMapIcon(x, y, z, 60, -1, -1, -1, -1, 100, MAPICON_GLOBAL, -1, 0);
  513.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Territory is successfully created!");
  514.             tr_timer[playerid] = SetTimerEx("Territory",3600000,false,"i",playerid);
  515.             }
  516.             if(listitem == 2)
  517.             {
  518.             if(tr_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Territory can by set only once!");
  519.             new Float:x, Float:y, Float:z;
  520.             GetPlayerPos(playerid, x, y, z);
  521.             t3 = CreateDynamicMapIcon(x, y, z, 61, -1, -1, -1, -1, 100, MAPICON_GLOBAL, -1, 0);
  522.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Territory is successfully created!");
  523.             tr_timer[playerid] = SetTimerEx("Territory",3600000,false,"i",playerid);
  524.             }
  525.             if(listitem == 3)
  526.             {
  527.             if(tr_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Territory can by set only once!");
  528.             new Float:x, Float:y, Float:z;
  529.             GetPlayerPos(playerid, x, y, z);
  530.             t4 = CreateDynamicMapIcon(x, y, z, 62, -1, -1, -1, -1, 100, MAPICON_GLOBAL, -1, 0);
  531.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Territory is successfully created!");
  532.             tr_timer[playerid] = SetTimerEx("Territory",3600000,false,"i",playerid);
  533.             }
  534.             if(listitem == 4)
  535.             {
  536.             SendClientMessage(playerid, 0xFF0000FF, "SERVER: Make sure you are in the middle of the gang base");
  537.             }
  538.         }
  539.         return 1;
  540.     }
  541.     return 0;
  542. }
  543.  
  544. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  545. {
  546.     if( newkeys & KEY_SUBMISSION)
  547.     {
  548.     if (dUserINT(PlayerName2(playerid)).("x20")!=10)
  549.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x20")),float(dUserINT(PlayerName2(playerid)).("y20")),float(dUserINT(PlayerName2(playerid)).("z20")));
  550.     }
  551.     return 1;
  552. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top