SHARE
TWEET

Gang Tester V2.1 - Small Updates

a guest Jan 20th, 2019 101 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.  
  6. #define     GANG            1
  7. #define     TELE            2
  8. #define     BASE            3
  9.  
  10. new Text3D:ltp1;
  11. new Text3D:ltp2;
  12. new Text3D:ltp3;
  13. new Text3D:ltp4;
  14. new Text3D:ltp5;
  15. new Text3D:ltp6;
  16. new Text3D:ltp7;
  17. new Text3D:ltp8;
  18. new Text3D:ltp9;
  19. new Text3D:ltp10;
  20. new Text3D:tloot;
  21. new Text3D:thouse;
  22. new tp1;
  23. new tp2;
  24. new tp3;
  25. new tp4;
  26. new tp5;
  27. new tp6;
  28. new tp7;
  29. new tp8;
  30. new tp9;
  31. new tp10;
  32. new hp;
  33. new ar;
  34. new mg;
  35. new rk;
  36. new loot;
  37. new ghouse;
  38. new t1;
  39. new t2;
  40. new t3;
  41. new t4;
  42. new spawn_timer[MAX_PLAYERS];
  43. new minigun_timer[MAX_PLAYERS];
  44. new rocket_timer[MAX_PLAYERS];
  45. new heal_timer[MAX_PLAYERS];
  46. new armour_timer[MAX_PLAYERS];
  47. new ghouse_timer[MAX_PLAYERS];
  48. new loot_timer[MAX_PLAYERS];
  49. new hp_timer[MAX_PLAYERS];
  50. new ar_timer[MAX_PLAYERS];
  51. new mg_timer[MAX_PLAYERS];
  52. new rk_timer[MAX_PLAYERS];
  53. new rp_timer[MAX_PLAYERS];
  54. new wp_timer[MAX_PLAYERS];
  55. new tp_timer[MAX_PLAYERS];
  56. new base_timer[MAX_PLAYERS];
  57. new tlp1_timer[MAX_PLAYERS];
  58. new tlp2_timer[MAX_PLAYERS];
  59. new tlp3_timer[MAX_PLAYERS];
  60. new tlp4_timer[MAX_PLAYERS];
  61. new tlp5_timer[MAX_PLAYERS];
  62. new tlp6_timer[MAX_PLAYERS];
  63. new tlp7_timer[MAX_PLAYERS];
  64. new tlp8_timer[MAX_PLAYERS];
  65. new tlp9_timer[MAX_PLAYERS];
  66. new tlp10_timer[MAX_PLAYERS];
  67. new tele1_timer[MAX_PLAYERS];
  68. new tele2_timer[MAX_PLAYERS];
  69. new tele3_timer[MAX_PLAYERS];
  70. new tele4_timer[MAX_PLAYERS];
  71. new tele5_timer[MAX_PLAYERS];
  72. new tele6_timer[MAX_PLAYERS];
  73. new tele7_timer[MAX_PLAYERS];
  74. new tele8_timer[MAX_PLAYERS];
  75. new tele9_timer[MAX_PLAYERS];
  76. new tele10_timer[MAX_PLAYERS];
  77.  
  78. #define CARS
  79. #if defined CARS
  80. new aVehicleNames[212][] =
  81. {
  82.     {"Landstalker"},
  83.     {"Bravura"},
  84.     {"Buffalo"},
  85.     {"Linerunner"},
  86.     {"Perrenial"},
  87.     {"Sentinel"},
  88.     {"Dumper"},
  89.     {"Firetruck"},
  90.     {"Trashmaster"},
  91.     {"Stretch"},
  92.     {"Manana"},
  93.     {"Infernus"},
  94.     {"Voodoo"},
  95.     {"Pony"},
  96.     {"Mule"},
  97.     {"Cheetah"},
  98.     {"Ambulance"},
  99.     {"Leviathan"},
  100.     {"Moonbeam"},
  101.     {"Esperanto"},
  102.     {"Taxi"},
  103.     {"Washington"},
  104.     {"Bobcat"},
  105.     {"Mr Whoopee"},
  106.     {"BF Injection"},
  107.     {"Hunter"},
  108.     {"Premier"},
  109.     {"Enforcer"},
  110.     {"Securicar"},
  111.     {"Banshee"},
  112.     {"Predator"},
  113.     {"Bus"},
  114.     {"Rhino"},
  115.     {"Barracks"},
  116.     {"Hotknife"},
  117.     {"Trailer 1"},
  118.     {"Previon"},
  119.     {"Coach"},
  120.     {"Cabbie"},
  121.     {"Stallion"},
  122.     {"Rumpo"},
  123.     {"RC Bandit"},
  124.     {"Romero"},
  125.     {"Packer"},
  126.     {"Monster"},
  127.     {"Admiral"},
  128.     {"Squalo"},
  129.     {"Seasparrow"},
  130.     {"Pizzaboy"},
  131.     {"Tram"},
  132.     {"Trailer 2"},
  133.     {"Turismo"},
  134.     {"Speeder"},
  135.     {"Reefer"},
  136.     {"Tropic"},
  137.     {"Flatbed"},
  138.     {"Yankee"},
  139.     {"Caddy"},
  140.     {"Solair"},
  141.     {"Berkley's RC Van"},
  142.     {"Skimmer"},
  143.     {"PCJ-600"},
  144.     {"Faggio"},
  145.     {"Freeway"},
  146.     {"RC Baron"},
  147.     {"RC Raider"},
  148.     {"Glendale"},
  149.     {"Oceanic"},
  150.     {"Sanchez"},
  151.     {"Sparrow"},
  152.     {"Patriot"},
  153.     {"Quad"},
  154.     {"Coastguard"},
  155.     {"Dinghy"},
  156.     {"Hermes"},
  157.     {"Sabre"},
  158.     {"Rustler"},
  159.     {"ZR-350"},
  160.     {"Walton"},
  161.     {"Regina"},
  162.     {"Comet"},
  163.     {"BMX"},
  164.     {"Burrito"},
  165.     {"Camper"},
  166.     {"Marquis"},
  167.     {"Baggage"},
  168.     {"Dozer"},
  169.     {"Maverick"},
  170.     {"News Chopper"},
  171.     {"Rancher"},
  172.     {"FBI Rancher"},
  173.     {"Virgo"},
  174.     {"Greenwood"},
  175.     {"Jetmax"},
  176.     {"Hotring"},
  177.     {"Sandking"},
  178.     {"Blista Compact"},
  179.     {"Police Maverick"},
  180.     {"Boxville"},
  181.     {"Benson"},
  182.     {"Mesa"},
  183.     {"RC Goblin"},
  184.     {"Hotring Racer A"},
  185.     {"Hotring Racer B"},
  186.     {"Bloodring Banger"},
  187.     {"Rancher"},
  188.     {"Super GT"},
  189.     {"Elegant"},
  190.     {"Journey"},
  191.     {"Bike"},
  192.     {"Mountain Bike"},
  193.     {"Beagle"},
  194.     {"Cropdust"},
  195.     {"Stunt"},
  196.     {"Tanker"},
  197.     {"Roadtrain"},
  198.     {"Nebula"},
  199.     {"Majestic"},
  200.     {"Buccaneer"},
  201.     {"Shamal"},
  202.     {"Hydra"},
  203.     {"FCR-900"},
  204.     {"NRG-500"},
  205.     {"HPV1000"},
  206.     {"Cement Truck"},
  207.     {"Tow Truck"},
  208.     {"Fortune"},
  209.     {"Cadrona"},
  210.     {"FBI Truck"},
  211.     {"Willard"},
  212.     {"Forklift"},
  213.     {"Tractor"},
  214.     {"Combine"},
  215.     {"Feltzer"},
  216.     {"Remington"},
  217.     {"Slamvan"},
  218.     {"Blade"},
  219.     {"Freight"},
  220.     {"Streak"},
  221.     {"Vortex"},
  222.     {"Vincent"},
  223.     {"Bullet"},
  224.     {"Clover"},
  225.     {"Sadler"},
  226.     {"Firetruck LA"},
  227.     {"Hustler"},
  228.     {"Intruder"},
  229.     {"Primo"},
  230.     {"Cargobob"},
  231.     {"Tampa"},
  232.     {"Sunrise"},
  233.     {"Merit"},
  234.     {"Utility"},
  235.     {"Nevada"},
  236.     {"Yosemite"},
  237.     {"Windsor"},
  238.     {"Monster A"},
  239.     {"Monster B"},
  240.     {"Uranus"},
  241.     {"Jester"},
  242.     {"Sultan"},
  243.     {"Stratum"},
  244.     {"Elegy"},
  245.     {"Raindance"},
  246.     {"RC Tiger"},
  247.     {"Flash"},
  248.     {"Tahoma"},
  249.     {"Savanna"},
  250.     {"Bandito"},
  251.     {"Freight Flat"},
  252.     {"Streak Carriage"},
  253.     {"Kart"},
  254.     {"Mower"},
  255.     {"Duneride"},
  256.     {"Sweeper"},
  257.     {"Broadway"},
  258.     {"Tornado"},
  259.     {"AT-400"},
  260.     {"DFT-30"},
  261.     {"Huntley"},
  262.     {"Stafford"},
  263.     {"BF-400"},
  264.     {"Newsvan"},
  265.     {"Tug"},
  266.     {"Trailer 3"},
  267.     {"Emperor"},
  268.     {"Wayfarer"},
  269.     {"Euros"},
  270.     {"Hotdog"},
  271.     {"Club"},
  272.     {"Freight Carriage"},
  273.     {"Trailer 3"},
  274.     {"Andromada"},
  275.     {"Dodo"},
  276.     {"RC Cam"},
  277.     {"Launch"},
  278.     {"Police Car (LSPD)"},
  279.     {"Police Car (SFPD)"},
  280.     {"Police Car (LVPD)"},
  281.     {"Police Ranger"},
  282.     {"Picador"},
  283.     {"S.W.A.T. Van"},
  284.     {"Alpha"},
  285.     {"Phoenix"},
  286.     {"Glendale"},
  287.     {"Sadler"},
  288.     {"Luggage Trailer A"},
  289.     {"Luggage Trailer B"},
  290.     {"Stair Trailer"},
  291.     {"Boxville"},
  292.     {"Farm Plow"},
  293.     {"Utility Trailer"}
  294. };
  295. #endif
  296.  
  297. public OnFilterScriptExit()
  298. {
  299.     DestroyDynamicCP(tp1);
  300.     DestroyDynamicCP(tp2);
  301.     DestroyDynamicCP(tp3);
  302.     DestroyDynamicCP(tp4);
  303.     DestroyDynamicCP(tp5);
  304.     DestroyDynamicCP(tp6);
  305.     DestroyDynamicCP(tp7);
  306.     DestroyDynamicCP(tp8);
  307.     DestroyDynamicCP(tp9);
  308.     DestroyDynamicCP(tp10);
  309.     Delete3DTextLabel(ltp1);
  310.     Delete3DTextLabel(ltp2);
  311.     Delete3DTextLabel(ltp3);
  312.     Delete3DTextLabel(ltp4);
  313.     Delete3DTextLabel(ltp5);
  314.     Delete3DTextLabel(ltp6);
  315.     Delete3DTextLabel(ltp7);
  316.     Delete3DTextLabel(ltp8);
  317.     Delete3DTextLabel(ltp9);
  318.     Delete3DTextLabel(ltp10);
  319.     Delete3DTextLabel(tloot);
  320.     Delete3DTextLabel(thouse);
  321.     DestroyDynamicPickup(hp);
  322.     DestroyDynamicPickup(ar);
  323.     DestroyDynamicPickup(loot);
  324.     DestroyDynamicPickup(ghouse);
  325.     DestroyDynamicPickup(mg);
  326.     DestroyDynamicPickup(rk);
  327.     DestroyDynamicPickup(mg);
  328.     DestroyDynamicPickup(rk);
  329.     return 1;
  330. }
  331. public OnPlayerCommandText(playerid, cmdtext[])
  332. {
  333.     if (strcmp("/editgang", cmdtext, true, 10) == 0)
  334.     {
  335.     if(IsPlayerAdmin(playerid))
  336.     {
  337.     ShowPlayerDialog(playerid, GANG ,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 Vehicle\n{FF0000}Set Teleports\n{FF0000}Remove Weapons\n{FF0000}Remove Teleports\n{FF0000}Remove Pickups","Select","Close");
  338.     }
  339.     else
  340.     {
  341.     }
  342.     return 1;
  343. }
  344.     if (strcmp("/base", cmdtext, true, 10) == 0)
  345.     {
  346.     ShowPlayerDialog(playerid, BASE ,DIALOG_STYLE_LIST,"Editgang Base","{FFFF00}Spawn","Teleport","Close");
  347.     return 1;
  348. }
  349.     if (strcmp("/gang", cmdtext, true, 10) == 0)
  350.     {
  351.     if (dUserINT(PlayerName2(playerid)).("x20")!=0)
  352.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x20")),float(dUserINT(PlayerName2(playerid)).("y20")),float(dUserINT(PlayerName2(playerid)).("z20")));
  353.     return 1;
  354. }
  355.     if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
  356.     {
  357.     new string[128];
  358.     new Float:x10,Float:y10,Float:z10,Float:a10;
  359.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  360.     if(tlp1_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  361.     GetPlayerPos(playerid,x10,y10,z10);
  362.     GetPlayerFacingAngle(playerid, a10);
  363.     dUserSetINT(PlayerName2(playerid)).("x10",floatround(x10));
  364.     dUserSetINT(PlayerName2(playerid)).("y10",floatround(y10));
  365.     dUserSetINT(PlayerName2(playerid)).("z10",floatround(z10));
  366.     dUserSetINT(PlayerName2(playerid)).("a10",floatround(a10));
  367.     tlp1_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  368.     return 1;
  369. }
  370.     if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
  371.     {
  372.     new string[128];
  373.     new Float:x11,Float:y11,Float:z11,Float:a11;
  374.     if(tlp2_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  375.     GetPlayerPos(playerid,x11,y11,z11);
  376.     GetPlayerFacingAngle(playerid, a11);
  377.     dUserSetINT(PlayerName2(playerid)).("x11",floatround(x11));
  378.     dUserSetINT(PlayerName2(playerid)).("y11",floatround(y11));
  379.     dUserSetINT(PlayerName2(playerid)).("z11",floatround(z11));
  380.     dUserSetINT(PlayerName2(playerid)).("a11",floatround(a11));
  381.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  382.     tlp2_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  383.     return 1;
  384. }
  385.     if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
  386.     {
  387.     new string[128];
  388.     new Float:x12,Float:y12,Float:z12,Float:a12;
  389.     if(tlp3_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  390.     GetPlayerPos(playerid,x12,y12,z12);
  391.     GetPlayerFacingAngle(playerid, a12);
  392.     dUserSetINT(PlayerName2(playerid)).("x12",floatround(x12));
  393.     dUserSetINT(PlayerName2(playerid)).("y12",floatround(y12));
  394.     dUserSetINT(PlayerName2(playerid)).("z12",floatround(z12));
  395.     dUserSetINT(PlayerName2(playerid)).("z12",floatround(a12));
  396.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  397.     tlp3_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  398.     return 1;
  399. }
  400.     if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
  401.     {
  402.     new string[128];
  403.     new Float:x13,Float:y13,Float:z13,Float:a13;
  404.     if(tlp4_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  405.     GetPlayerPos(playerid,x13,y13,z13);
  406.     GetPlayerFacingAngle(playerid, a13);
  407.     dUserSetINT(PlayerName2(playerid)).("x13",floatround(x13));
  408.     dUserSetINT(PlayerName2(playerid)).("y13",floatround(y13));
  409.     dUserSetINT(PlayerName2(playerid)).("z13",floatround(z13));
  410.     dUserSetINT(PlayerName2(playerid)).("a13",floatround(a13));
  411.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  412.     tlp4_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  413.     return 1;
  414. }
  415.     if (strcmp("/gtloc 5", cmdtext, true, 10) == 0)
  416.     {
  417.     new string[128];
  418.     new Float:x14,Float:y14,Float:z14,Float:a14;
  419.     GetPlayerPos(playerid,x14,y14,z14);
  420.     GetPlayerFacingAngle(playerid, a14);
  421.     if(tlp5_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  422.     dUserSetINT(PlayerName2(playerid)).("x14",floatround(x14));
  423.     dUserSetINT(PlayerName2(playerid)).("y14",floatround(y14));
  424.     dUserSetINT(PlayerName2(playerid)).("z14",floatround(z14));
  425.     dUserSetINT(PlayerName2(playerid)).("a14",floatround(a14));
  426.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  427.     tlp5_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  428.     return 1;
  429. }
  430.     if (strcmp("/gtloc 6", cmdtext, true, 10) == 0)
  431.     {
  432.     new string[128];
  433.     new Float:x15,Float:y15,Float:z15,Float:a15;
  434.     GetPlayerPos(playerid,x15,y15,z15);
  435.     GetPlayerFacingAngle(playerid, a15);
  436.     if(tlp6_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  437.     dUserSetINT(PlayerName2(playerid)).("x15",floatround(x15));
  438.     dUserSetINT(PlayerName2(playerid)).("y15",floatround(y15));
  439.     dUserSetINT(PlayerName2(playerid)).("z15",floatround(z15));
  440.     dUserSetINT(PlayerName2(playerid)).("a15",floatround(a15));
  441.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  442.     tlp6_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  443.     return 1;
  444. }
  445.     if (strcmp("/gtloc 7", cmdtext, true, 10) == 0)
  446.     {
  447.     new string[128];
  448.     new Float:x16,Float:y16,Float:z16,Float:a16;
  449.     GetPlayerPos(playerid,x16,y16,z16);
  450.     GetPlayerFacingAngle(playerid, a16);
  451.     if(tlp7_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  452.     dUserSetINT(PlayerName2(playerid)).("x16",floatround(x16));
  453.     dUserSetINT(PlayerName2(playerid)).("y16",floatround(y16));
  454.     dUserSetINT(PlayerName2(playerid)).("z16",floatround(z16));
  455.     dUserSetINT(PlayerName2(playerid)).("a16",floatround(a16));
  456.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  457.     tlp7_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  458.     return 1;
  459. }
  460.     if (strcmp("/gtloc 8", cmdtext, true, 10) == 0)
  461.     {
  462.     new string[128];
  463.     new Float:x17,Float:y17,Float:z17,Float:a17;
  464.     GetPlayerPos(playerid,x17,y17,z17);
  465.     GetPlayerFacingAngle(playerid, a17);
  466.     if(tlp8_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  467.     dUserSetINT(PlayerName2(playerid)).("x17",floatround(x17));
  468.     dUserSetINT(PlayerName2(playerid)).("y17",floatround(y17));
  469.     dUserSetINT(PlayerName2(playerid)).("z17",floatround(z17));
  470.     dUserSetINT(PlayerName2(playerid)).("a17",floatround(a17));
  471.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  472.     tlp8_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  473.     return 1;
  474. }
  475.     if (strcmp("/gtloc 9", cmdtext, true, 10) == 0)
  476.     {
  477.     new string[128];
  478.     new Float:x18,Float:y18,Float:z18,Float:a18;
  479.     GetPlayerPos(playerid,x18,y18,z18);
  480.     GetPlayerFacingAngle(playerid, a18);
  481.     if(tlp9_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  482.     dUserSetINT(PlayerName2(playerid)).("x18",floatround(x18));
  483.     dUserSetINT(PlayerName2(playerid)).("y18",floatround(y18));
  484.     dUserSetINT(PlayerName2(playerid)).("z18",floatround(z18));
  485.     dUserSetINT(PlayerName2(playerid)).("a18",floatround(a18));
  486.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  487.     tlp9_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  488.     return 1;
  489. }
  490.     if (strcmp("/gtloc 10", cmdtext, true, 10) == 0)
  491.     {
  492.     new string[128];
  493.     new Float:x19,Float:y19,Float:z19,Float:a19;
  494.     GetPlayerPos(playerid,x19,y19,z19);
  495.     GetPlayerFacingAngle(playerid, a19);
  496.     if(tlp10_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
  497.     dUserSetINT(PlayerName2(playerid)).("x19",floatround(x19));
  498.     dUserSetINT(PlayerName2(playerid)).("y19",floatround(y19));
  499.     dUserSetINT(PlayerName2(playerid)).("z19",floatround(z19));
  500.     dUserSetINT(PlayerName2(playerid)).("a19",floatround(a19));
  501.     SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleport was successfully saved!");
  502.     tlp10_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  503.     return 1;
  504. }
  505.     return 0;
  506. }
  507. public OnPlayerPickUpDynamicPickup(playerid, pickupid)
  508. {
  509.     if(pickupid == hp)
  510.     {
  511.     new string[128];
  512.     if(heal_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  513.     SetPlayerHealth(playerid,100);
  514.     GameTextForPlayer(playerid, "~r~~h~Hp Filled", 2500, 3);
  515.     heal_timer[playerid] = SetTimerEx("heal",200000,false,"i",playerid);
  516.     }
  517.     if(pickupid == ar)
  518.     {
  519.     new string[128];
  520.     if(armour_timer[playerid] > 0)return format(string, sizeof(string), "ERROR: You can heal only once every 2 minutes!"),SendClientMessage(playerid, 0xFF0000FF, string);
  521.     SetPlayerArmour(playerid,100);
  522.     GameTextForPlayer(playerid, "~b~~h~Armour Filled", 2500, 3);
  523.     armour_timer[playerid] = SetTimerEx("armour",200000,false,"i",playerid);
  524.     }
  525.     if(pickupid == mg)
  526.     {
  527.     new string[128];
  528.     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);
  529.     GivePlayerWeapon(playerid, 38, 50);
  530.     GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
  531.     minigun_timer[playerid] = SetTimerEx("Minigun",1000000,false,"i",playerid);
  532.     }
  533.     if(pickupid == rk)
  534.     {
  535.     new string[128];
  536.     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);
  537.     GivePlayerWeapon(playerid, 35, 10);
  538.     SetTimer("message", 100000, 1);
  539.     GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3);
  540.     rocket_timer[playerid] = SetTimerEx("Rocket",1000000,false,"i",playerid);
  541.     }
  542.     if(pickupid == ghouse)
  543.     {
  544.     }
  545.     if(pickupid == loot)
  546.     {
  547.     }
  548.     return 1;
  549. }
  550. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  551. {
  552.     if(checkpointid == tp1)
  553.     {
  554.     if (dUserINT(PlayerName2(playerid)).("x10")!=0)
  555.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x10")),float(dUserINT(PlayerName2(playerid)).("y10")),float(dUserINT(PlayerName2(playerid)).("z10")));
  556.     }
  557.     if(checkpointid == tp2)
  558.     {
  559.     if (dUserINT(PlayerName2(playerid)).("x11")!=0)
  560.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x11")),float(dUserINT(PlayerName2(playerid)).("y11")),float(dUserINT(PlayerName2(playerid)).("z11")));
  561.     }
  562.     if(checkpointid == tp3)
  563.     {
  564.     if (dUserINT(PlayerName2(playerid)).("x12")!=0)
  565.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x12")),float(dUserINT(PlayerName2(playerid)).("y12")),float(dUserINT(PlayerName2(playerid)).("z12")));
  566.     }
  567.     if(checkpointid == tp4)
  568.     {
  569.     if (dUserINT(PlayerName2(playerid)).("x13")!=0)
  570.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x13")),float(dUserINT(PlayerName2(playerid)).("y13")),float(dUserINT(PlayerName2(playerid)).("z13")));
  571.     }
  572.     if(checkpointid == tp5)
  573.     {
  574.     if (dUserINT(PlayerName2(playerid)).("x14")!=0)
  575.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x14")),float(dUserINT(PlayerName2(playerid)).("y14")),float(dUserINT(PlayerName2(playerid)).("z14")));
  576.     }
  577.     if(checkpointid == tp6)
  578.     {
  579.     if (dUserINT(PlayerName2(playerid)).("x15")!=0)
  580.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x15")),float(dUserINT(PlayerName2(playerid)).("y15")),float(dUserINT(PlayerName2(playerid)).("z15")));
  581.     }
  582.     if(checkpointid == tp7)
  583.     {
  584.     if (dUserINT(PlayerName2(playerid)).("x16")!=0)
  585.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x16")),float(dUserINT(PlayerName2(playerid)).("y16")),float(dUserINT(PlayerName2(playerid)).("z16")));
  586.     }
  587.     if(checkpointid == tp8)
  588.     {
  589.     if (dUserINT(PlayerName2(playerid)).("x17")!=0)
  590.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x17")),float(dUserINT(PlayerName2(playerid)).("y17")),float(dUserINT(PlayerName2(playerid)).("z17")));
  591.     }
  592.     if(checkpointid == tp9)
  593.     {
  594.     if (dUserINT(PlayerName2(playerid)).("x18")!=0)
  595.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x18")),float(dUserINT(PlayerName2(playerid)).("y18")),float(dUserINT(PlayerName2(playerid)).("z18")));
  596.     }
  597.     if(checkpointid == tp10)
  598.     {
  599.     if (dUserINT(PlayerName2(playerid)).("x19")!=0)
  600.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x19")),float(dUserINT(PlayerName2(playerid)).("y19")),float(dUserINT(PlayerName2(playerid)).("z19")));
  601.     }
  602.     return 1;
  603. }
  604.  
  605. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  606. {
  607.     if(dialogid ==  GANG)
  608.     {
  609.         if(response)
  610.         {
  611.             if(listitem == 0)
  612.             {
  613.             if(spawn_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Spawn can by set only once!");
  614.             new Float:x20,Float:y20,Float:z20;
  615.             GetPlayerPos(playerid,x20,y20,z20);
  616.             dUserSetINT(PlayerName2(playerid)).("x20",floatround(x20));
  617.             dUserSetINT(PlayerName2(playerid)).("y20",floatround(y20));
  618.             dUserSetINT(PlayerName2(playerid)).("z20",floatround(z20));
  619.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Spawn was successfully set!");
  620.             spawn_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  621.             }
  622.             if(listitem == 1)
  623.             {
  624.             if(ghouse_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang House can by set only once!");
  625.             new Float:x, Float:y, Float:z;
  626.             GetPlayerPos(playerid, x, y, z);
  627.             ghouse = CreateDynamicPickup(1239, 1, x, y, z, -1);
  628.             thouse = Create3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, x, y, z, 25.0, 0);
  629.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang House was successfully set!");
  630.             ghouse_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  631.             }
  632.             if(listitem == 2)
  633.             {
  634.             if(base_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Base can by set only once!");
  635.             new Float:x21, Float:y21, Float:z21, Float:a21;
  636.             GetPlayerPos(playerid, x21, y21, z21);
  637.             GetPlayerFacingAngle(playerid, a21);
  638.             dUserSetINT(PlayerName2(playerid)).("x21",floatround(x21));
  639.             dUserSetINT(PlayerName2(playerid)).("y21",floatround(y21));
  640.             dUserSetINT(PlayerName2(playerid)).("z21",floatround(z21));
  641.             dUserSetINT(PlayerName2(playerid)).("a21",floatround(a21));
  642.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Base was successfully set!");
  643.             base_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  644.             }
  645.             if(listitem == 3)
  646.             {
  647.             if(loot_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Loot can by set only once!");
  648.             new Float:x, Float:y, Float:z;
  649.             GetPlayerPos(playerid, x, y, z);
  650.             loot = CreateDynamicPickup(1550, 1, x, y, z, -1);
  651.             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, 25.0, 0);
  652.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Loot was successfully set!");
  653.             loot_timer[playerid] = SetTimerEx("Gang",3600000,false,"i",playerid);
  654.             }
  655.             if(listitem == 4)
  656.             {
  657.             if(hp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Health can by set only once!");
  658.             new Float:x, Float:y, Float:z;
  659.             GetPlayerPos(playerid, x, y, z);
  660.             hp = CreateDynamicPickup(1240, 1, x, y, z, -1);
  661.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Health was successfully set!");
  662.             hp_timer[playerid] = SetTimerEx("Health",3600000,false,"i",playerid);
  663.             }
  664.             if(listitem == 5)
  665.             {
  666.             if(ar_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Armour can by set only once!");
  667.             new Float:x, Float:y, Float:z;
  668.             GetPlayerPos(playerid, x, y, z);
  669.             ar = CreateDynamicPickup(1242, 1, x, y, z, -1);
  670.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Armour was successfully set!");
  671.             ar_timer[playerid] = SetTimerEx("Armour",3600000,false,"i",playerid);
  672.             }
  673.             if(listitem == 6)
  674.             {
  675.             if(mg_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Minigun can by set only once!");
  676.             new Float:x, Float:y, Float:z;
  677.             GetPlayerPos(playerid, x, y, z);
  678.             mg = CreateDynamicPickup(362, 1, x, y, z, -1);
  679.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Minigun was successfully set!");
  680.             mg_timer[playerid] = SetTimerEx("Minigun",3600000,false,"i",playerid);
  681.             }
  682.             if(listitem == 7)
  683.             {
  684.             if(rk_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Rocket can by set only once!");
  685.             new Float:x, Float:y, Float:z;
  686.             GetPlayerPos(playerid, x, y, z);
  687.             rk = CreateDynamicPickup(359, 1, x, y, z, -1);
  688.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Rocket was successfully set!");
  689.             rk_timer[playerid] = SetTimerEx("Rocket",3600000,false,"i",playerid);
  690.             }
  691.             if(listitem == 8)
  692.             {
  693.             ShowPlayerDialog(playerid, 20 ,DIALOG_STYLE_INPUT ,"{FF0000}Set Vehicle","Please write bellow vehicle name or id","Select","Close");
  694.             }
  695.             if(listitem == 9)
  696.             {
  697.             ShowPlayerDialog(playerid, TELE ,DIALOG_STYLE_LIST ,"{FF0000}Set Teleport","{FF0000}#1\n#2\n#3\n#4\n#5\n#6\n#7\n#8\n#9\n#10","Create","Close");
  698.             }
  699.             if(listitem == 10)
  700.             {
  701.             if(wp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Weapons are not created!");
  702.             DestroyDynamicPickup(mg);
  703.             DestroyDynamicPickup(rk);
  704.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Gang Weapons are successfully removed!");
  705.             wp_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  706.             }
  707.             if(listitem == 11)
  708.             {
  709.             if(tp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports are not created!");
  710.             DestroyDynamicCP(tp1);
  711.             DestroyDynamicCP(tp2);
  712.             DestroyDynamicCP(tp3);
  713.             DestroyDynamicCP(tp4);
  714.             DestroyDynamicCP(tp5);
  715.             DestroyDynamicCP(tp6);
  716.             DestroyDynamicCP(tp7);
  717.             DestroyDynamicCP(tp8);
  718.             DestroyDynamicCP(tp9);
  719.             DestroyDynamicCP(tp10);
  720.             Delete3DTextLabel(ltp1);
  721.             Delete3DTextLabel(ltp2);
  722.             Delete3DTextLabel(ltp3);
  723.             Delete3DTextLabel(ltp4);
  724.             Delete3DTextLabel(ltp5);
  725.             Delete3DTextLabel(ltp6);
  726.             Delete3DTextLabel(ltp7);
  727.             Delete3DTextLabel(ltp8);
  728.             Delete3DTextLabel(ltp9);
  729.             Delete3DTextLabel(ltp10);
  730.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Teleports are successfully removed!");
  731.             tp_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  732.             }
  733.             if(listitem == 12)
  734.             {
  735.             if(rp_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Pickups are not created!");
  736.             Delete3DTextLabel(tloot);
  737.             Delete3DTextLabel(thouse);
  738.             DestroyDynamicPickup(hp);
  739.             DestroyDynamicPickup(ar);
  740.             DestroyDynamicPickup(loot);
  741.             DestroyDynamicPickup(ghouse);
  742.             DestroyDynamicMapIcon(t1);
  743.             DestroyDynamicMapIcon(t2);
  744.             DestroyDynamicMapIcon(t3);
  745.             DestroyDynamicMapIcon(t4);
  746.             SendClientMessage(playerid, 0x00CC3300, "SERVER: Pickups are successfully removed!");
  747.             rp_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  748.             }
  749.         }
  750.         return 1;
  751.     }
  752.     if(dialogid == BASE)
  753.     {
  754.     if(response)
  755.     {
  756.     if (dUserINT(PlayerName2(playerid)).("x21")!=0)
  757.     SetPlayerPos(playerid,float(dUserINT(PlayerName2(playerid)).("x21")),float(dUserINT(PlayerName2(playerid)).("y21")),float(dUserINT(PlayerName2(playerid)).("z21")));
  758.     }
  759.     return 1;
  760.     }
  761.     if(dialogid == 10)
  762.     {
  763.     if(response)
  764.     {
  765.             if(tele1_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  766.             new Float:x,Float:y,Float:z;
  767.             GetPlayerPos(playerid,x,y,z);
  768.             tp1 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  769.             ltp1 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  770.             Update3DTextLabelText(ltp1, -1, inputtext);
  771.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 1 to save checkpoint direction!");
  772.             tele1_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  773.     }
  774.     return 1;
  775.     }
  776.     if(dialogid == 11)
  777.     {
  778.     if(response)
  779.     {
  780.             if(tele2_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  781.             new Float:x,Float:y,Float:z;
  782.             GetPlayerPos(playerid,x,y,z);
  783.             tp2 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  784.             ltp2 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  785.             Update3DTextLabelText(ltp2, -1, inputtext);
  786.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 2 to save checkpoint direction!");
  787.             tele2_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  788.     }
  789.     return 1;
  790.     }
  791.     if(dialogid == 12)
  792.     {
  793.     if(response)
  794.     {
  795.             if(tele3_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  796.             new Float:x,Float:y,Float:z;
  797.             GetPlayerPos(playerid,x,y,z);
  798.             tp3 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  799.             ltp3 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  800.             Update3DTextLabelText(ltp3, -1, inputtext);
  801.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 3 to save checkpoint direction!");
  802.             tele3_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  803.     }
  804.     return 1;
  805.     }
  806.     if(dialogid == 13)
  807.     {
  808.     if(response)
  809.     {
  810.             if(tele4_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  811.             new Float:x,Float:y,Float:z;
  812.             GetPlayerPos(playerid,x,y,z);
  813.             tp4 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  814.             ltp4 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  815.             Update3DTextLabelText(ltp4, -1, inputtext);
  816.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 4 to save checkpoint direction!");
  817.             tele4_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  818.     }
  819.     return 1;
  820.     }
  821.     if(dialogid == 14)
  822.     {
  823.     if(response)
  824.     {
  825.             if(tele5_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  826.             new Float:x,Float:y,Float:z;
  827.             GetPlayerPos(playerid,x,y,z);
  828.             tp5 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  829.             ltp5 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  830.             Update3DTextLabelText(ltp5, -1, inputtext);
  831.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 5 to save checkpoint direction!");
  832.             tele5_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  833.     }
  834.     return 1;
  835.     }
  836.     if(dialogid == 15)
  837.     {
  838.     if(response)
  839.     {
  840.             if(tele6_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  841.             new Float:x,Float:y,Float:z;
  842.             GetPlayerPos(playerid,x,y,z);
  843.             tp6 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  844.             ltp6 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  845.             Update3DTextLabelText(ltp6, -1, inputtext);
  846.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 6 to save checkpoint direction!");
  847.             tele6_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  848.     }
  849.     return 1;
  850.     }
  851.     if(dialogid == 16)
  852.     {
  853.     if(response)
  854.     {
  855.             if(tele7_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  856.             new Float:x,Float:y,Float:z;
  857.             GetPlayerPos(playerid,x,y,z);
  858.             tp7 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  859.             ltp7 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  860.             Update3DTextLabelText(ltp7, -1, inputtext);
  861.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 7 to save checkpoint direction!");
  862.             tele7_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  863.     }
  864.     return 1;
  865.     }
  866.     if(dialogid == 17)
  867.     {
  868.     if(response)
  869.     {
  870.             if(tele8_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  871.             new Float:x,Float:y,Float:z;
  872.             GetPlayerPos(playerid,x,y,z);
  873.             tp8 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  874.             ltp8 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  875.             Update3DTextLabelText(ltp8, -1, inputtext);
  876.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 8 to save checkpoint direction!");
  877.             tele8_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  878.     }
  879.     return 1;
  880.     }
  881.     if(dialogid == 18)
  882.     {
  883.     if(response)
  884.     {
  885.             if(tele9_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  886.             new Float:x,Float:y,Float:z;
  887.             GetPlayerPos(playerid,x,y,z);
  888.             tp9 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  889.             ltp9 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  890.             Update3DTextLabelText(ltp9, -1, inputtext);
  891.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 9 to save checkpoint direction!");
  892.             tele9_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  893.     }
  894.     return 1;
  895.     }
  896.     if(dialogid == 19)
  897.     {
  898.     if(response)
  899.     {
  900.             if(tele10_timer[playerid] > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Teleports can be set only once!");
  901.             new Float:x,Float:y,Float:z;
  902.             GetPlayerPos(playerid,x,y,z);
  903.             tp10 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 15, -1, 0);
  904.             ltp10 = Create3DTextLabel("", -1, x, y, z, 25, 0);
  905.             Update3DTextLabelText(ltp10, -1, inputtext);
  906.             SendClientMessage(playerid,0x00CC3300, "SERVER: Teleport createad! - Use /gtloc 10 to save checkpoint direction!");
  907.             tele10_timer[playerid] = SetTimerEx("RPickups",3600000,false,"i",playerid);
  908.     }
  909.     return 1;
  910.     }
  911.     if(dialogid == 20)
  912.     {
  913.     if(response)
  914.     {
  915.         new idx;
  916.         new tmp[256];
  917.         new Float:x, Float:y, Float:z;
  918.         tmp = strtok(inputtext, idx);
  919.         if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Invalid vehicle name/id");
  920.         new vehicle = GetVehicleModelIDFromName(tmp);
  921.         if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This vehicle is not exist");
  922.         new Float:a;
  923.         GetPlayerFacingAngle(playerid, a);
  924.         GetPlayerPos(playerid, x, y, z);
  925.         PutPlayerInVehicle(playerid, vehicle, 0);
  926.         if(IsPlayerInAnyVehicle(playerid) == 1)
  927.         {
  928.             GetXYInFrontOfPlayer(playerid, x, y, 8);
  929.         }
  930.         else
  931.         {
  932.             GetXYInFrontOfPlayer(playerid, x, y, 5);
  933.         }
  934.         new PlayersVehicle = CreateVehicle(vehicle, x, y, z, a+90, -1, -1, -1);
  935.         PutPlayerInVehicle(playerid, vehicle, 0);
  936.         LinkVehicleToInterior(PlayersVehicle, GetPlayerInterior(playerid));
  937.         SendClientMessage(playerid,0x00CC3300, "SERVER: Vehicle was successfully created!");
  938.     }
  939.     return 1;
  940.     }
  941.     if(dialogid == TELE)
  942.     {
  943.     if(response)
  944.         {
  945.             if(listitem == 0)
  946.             {
  947.             ShowPlayerDialog(playerid, 10 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  948.             }
  949.             else if(listitem == 1)
  950.             {
  951.             ShowPlayerDialog(playerid, 11 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  952.             }
  953.             else if(listitem == 2)
  954.             {
  955.             ShowPlayerDialog(playerid, 12 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  956.             }
  957.             else if(listitem == 3)
  958.             {
  959.             ShowPlayerDialog(playerid, 13 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  960.             }
  961.             else if(listitem == 4)
  962.             {
  963.             ShowPlayerDialog(playerid, 14 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  964.             }
  965.             else if(listitem == 5)
  966.             {
  967.             ShowPlayerDialog(playerid, 15 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  968.             }
  969.             else if(listitem == 6)
  970.             {
  971.             ShowPlayerDialog(playerid, 16 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  972.             }
  973.             else if(listitem == 7)
  974.             {
  975.             ShowPlayerDialog(playerid, 17 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  976.             }
  977.             else if(listitem == 8)
  978.             {
  979.             ShowPlayerDialog(playerid, 18 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  980.             }
  981.             else if(listitem == 9)
  982.             {
  983.             ShowPlayerDialog(playerid, 19 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
  984.             }
  985.         }
  986.     return 1;
  987.     }
  988.     return 0;
  989. }
  990. GetVehicleModelIDFromName(vname[])
  991. {
  992.     for(new i = 0; i < 211; i++)
  993.     {
  994.         if(strfind(aVehicleNames[i], vname, true) != -1)
  995.         return i + 400;
  996.     }
  997.     return -1;
  998. }
  999. stock GetXYInFrontOfPlayer(playerid, &Float:x2, &Float:y2, Float:distance)
  1000. {
  1001.     new Float:a;
  1002.     GetPlayerPos(playerid, x2, y2, a);
  1003.     GetPlayerFacingAngle(playerid, a);
  1004.     if(GetPlayerVehicleID(playerid))
  1005.     {
  1006.         GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  1007.     }
  1008.     x2 += (distance * floatsin(-a, degrees));
  1009.     y2 += (distance * floatcos(-a, degrees));
  1010. }
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