Advertisement
sreadon

TPGun

Jul 12th, 2011
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.59 KB | None | 0 0
  1. /*
  2. For SAMP 0.3c
  3. FilterScript by Sreadon
  4. Really simple system but usefull for DM Gamemode.
  5. Please do not remove the credits..
  6. If you saw a bug, contact me on SAMP Forum => Sreadon with pm.
  7. Thank's to Zeex for zcmd
  8. */
  9.  
  10.  
  11. #define FILTERSCRIPT
  12. #define COLOR_INFO 0xFFA500FF
  13.  
  14. #include <a_samp>
  15. #include <zcmd>
  16.  
  17. public OnFilterScriptInit()
  18. {
  19.     print("\n=============================================================");
  20.     print(" ***********   *********      ******   ***   ***  ***     ***");
  21.     print(" ***********   ***    **    **         ***   ***  *****   ***");
  22.     print("    ****       *********    **         ***   ***  *** **  ***");
  23.         print("    ****       ***          **  *****  ***   ***  ***  ** ***");
  24.     print("    ****       ***          **    ***  *********  ***   *****");
  25.     print("    ****       ***            *******  *********  ***    ****");
  26.     print("=============================================================");
  27.         print("By Sreadon");
  28.         print("Version 1.0");
  29.     print("=============================================================");
  30.     return 1;
  31. }
  32.  
  33. /* [IMPORTANT NOTE]:
  34. If you use others dialog with this filterscript, do not forget to change ID's of dialogs in this filterscript!
  35. */
  36.  
  37.  
  38. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  39. {
  40.     new Float:X, Float:Y, Float:Z;
  41.     if(response)
  42.     {
  43.     switch(dialogid == 1) // <==== For exemple, you will needs to change this ID if you use others dialogs with this filterscript.
  44.         {
  45.         case 1:
  46.             {
  47.             switch(listitem)// Checking which listitem was selected
  48.             {
  49.                 case 0://----------[Menu for buy a gun]-------------//
  50.                 {
  51.                     ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Gun Shop", "Sdpistol \nDesert Eagle \nShotgun \nSawn-off \nM4 \nAk-47 \nParachute \nChainsaw \nSniper Rifle \nJetPack", "Purchase", "Cancel");
  52.                 }
  53.                 case 1: //----------[Menu for buy a car]-------------//
  54.                 {
  55.                     ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Car Shop", "Coach  \nHotknife \nBF Injection \nMonster \nSparrow \nMaverick \nHydra \nCargobob \nBufallo \nTurismo \nBullet \nSanchez \nNRG500 \nVortex \nKarting", "Purchase", "Cancel");
  56.                 }
  57.                 case 2: //----------[Menu for teleportations]-------------//
  58.                 {
  59.                     ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "TeleportMenu", "LeavedAirport \nLas Venturas Airport \nLos Santos Airport \nSan Fierro Airport \nGrooveStreet \nAera 51 ", "Purchase", "Cancel");
  60.                 }
  61.             }
  62.             }
  63.     }
  64.     }
  65.    
  66.  
  67.     if(response)
  68.     {
  69.     switch(dialogid == 2)
  70.         {
  71.         case 1:
  72.             {
  73.             switch(listitem)
  74.             {
  75.                 case 0://----------[That Give a SDPistol to the player]-------------//
  76.                 {
  77.                     GivePlayerWeapon(playerid, 23, 200);
  78.                 }
  79.                 case 1: //----------[That Give a Deagle to the player]-------------//
  80.                 {
  81.                     GivePlayerWeapon(playerid, 24, 200);
  82.                 }
  83.                 case 2: //----------[That Give a Simply shotgun to the player]-------------//
  84.                 {
  85.                     GivePlayerWeapon(playerid, 25, 200);
  86.                 }
  87.                 case 3: //----------[That Give a Sawn-off to the player]-------------//
  88.                 {
  89.                     GivePlayerWeapon(playerid, 26, 200);
  90.                 }
  91.                 case 4: //----------[That Give a M4 to the player]-------------//
  92.                 {
  93.                     GivePlayerWeapon(playerid, 31, 400);
  94.                 }
  95.                 case 5: //----------[That Give a AK-47 to the player]-------------//
  96.                 {
  97.                     GivePlayerWeapon(playerid, 30, 400);
  98.                 }
  99.                 case 6: //----------[That Give a parachute to the player]-------------//
  100.                 {
  101.                     GivePlayerWeapon(playerid, 46, 1);
  102.                 }
  103.                 case 7: //----------[That Give a chainsaw to the player]-------------//
  104.                 {
  105.                     GivePlayerWeapon(playerid, 9, 1);
  106.                 }
  107.                 case 8: //----------[That Give a SniperRifle to the player]-------------//
  108.                 {
  109.                     GivePlayerWeapon(playerid, 34, 200);
  110.                 }
  111.                 case 9: //----------[That Give a JetPack to the player]-------------//
  112.                 {
  113.                     SetPlayerSpecialAction(playerid, 2);
  114.                 }
  115.             }
  116.             }
  117.     }
  118.     }
  119.  
  120.  
  121.  
  122.  
  123.     if(response)
  124.     {
  125.     switch(dialogid == 3)
  126.         {
  127.         case 1:
  128.             {
  129.             switch(listitem)
  130.             {
  131.                 case 0: //-----------------[Spawn a Coach]----------------//
  132.                 {
  133.                     GetPlayerPos(playerid, X, Y, Z);
  134.                     CreateVehicle(431, X+4, Y, Z, 10, 0, 0, 100);
  135.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Coach]");
  136.                 }
  137.                 case 1: //----------------[Spawn a Hotknife]-------------//
  138.                 {
  139.                     GetPlayerPos(playerid, X, Y, Z);
  140.                     CreateVehicle(434, X+4, Y, Z, 10, 0, 0, 100);
  141.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Hotknife]");
  142.                 }
  143.                 case 2: //--------------[Spawn a BF Injection]--------------//
  144.                 {
  145.                     GetPlayerPos(playerid, X, Y, Z);
  146.                     CreateVehicle(424, X+4, Y, Z, 10, 0, 0, 100);
  147.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [BF Injection]");
  148.                 }
  149.                 case 3: //--------------[Spawn a Monster]--------------//
  150.                 {
  151.                     GetPlayerPos(playerid, X, Y, Z);
  152.                     CreateVehicle(444, X+4, Y, Z, 10, 0, 0, 100);
  153.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Monster]");
  154.                 }
  155.                 case 4: //--------------[Spawn a Sparrow]--------------//
  156.                 {
  157.                     GetPlayerPos(playerid, X, Y, Z);
  158.                     CreateVehicle(469, X+4, Y, Z, 10, 0, 0, 100);
  159.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Sparrow]");
  160.                 }
  161.                 case 5: //--------------[Spawn a Maverick]--------------//
  162.                 {
  163.                     GetPlayerPos(playerid, X, Y, Z);
  164.                     CreateVehicle(487, X+4, Y, Z, 10, 0, 0, 100);
  165.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Maverick]");
  166.                 }
  167.                 case 6: //--------------[Spawn a Hydra]--------------//
  168.                 {
  169.                     GetPlayerPos(playerid, X, Y, Z);
  170.                     CreateVehicle(520, X+4, Y, Z, 10, 0, 0, 100);
  171.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Hydra]");
  172.                 }
  173.                 case 7: //--------------[Spawn a Cargobob]--------------//
  174.                 {
  175.                     GetPlayerPos(playerid, X, Y, Z);
  176.                     CreateVehicle(548, X+4, Y, Z, 10, 0, 0, 100);
  177.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Cargobob]");
  178.                 }
  179.                 case 8: //--------------[Spawn a Buffalo]--------------//
  180.                 {
  181.                     GetPlayerPos(playerid, X, Y, Z);
  182.                     CreateVehicle(402, X+4, Y, Z, 10, 0, 0, 100);
  183.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Bufallo]");
  184.                 }
  185.                 case 9: //--------------[Spawn a Turismo]--------------//
  186.                 {
  187.                     GetPlayerPos(playerid, X, Y, Z);
  188.                     CreateVehicle(451, X+4, Y, Z, 10, 0, 0, 100);
  189.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Turismo]");
  190.                 }
  191.                 case 10: //--------------[Spawn a Bullet]--------------//
  192.                 {
  193.                     GetPlayerPos(playerid, X, Y, Z);
  194.                     CreateVehicle(541, X+4, Y, Z, 10, 0, 0, 100);
  195.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Bullet]");
  196.                 }
  197.                 case 11: //--------------[Spawn a Sanchez]--------------//
  198.                 {
  199.                     GetPlayerPos(playerid, X, Y, Z);
  200.                     CreateVehicle(468, X+4, Y, Z, 10, 0, 0, 100);
  201.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Sanchez]");
  202.                 }
  203.                 case 12: //--------------[Spawn a NRG500]--------------//
  204.                 {
  205.                     GetPlayerPos(playerid, X, Y, Z);
  206.                     CreateVehicle(522, X+4, Y, Z, 10, 0, 0, 100);
  207.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [NRG500]");
  208.                 }
  209.                 case 13: //--------------[Spawn a Vortex]--------------//
  210.                 {
  211.                     GetPlayerPos(playerid, X, Y, Z);
  212.                     CreateVehicle(539, X+4, Y, Z, 10, 0, 0, 100);
  213.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Vortex]");
  214.                 }
  215.                 case 14: //--------------[Spawn a Karting]--------------//
  216.                 {
  217.                     GetPlayerPos(playerid, X, Y, Z);
  218.                     CreateVehicle(571, X+4, Y, Z, 10, 0, 0, 100);
  219.                     SendClientMessage(playerid, COLOR_INFO, "You have spawned vehicule [Karting]");
  220.                 }
  221.             }
  222.             }
  223.     }
  224.     }
  225.  
  226.     if(response)
  227.     {
  228.     switch(dialogid == 4)
  229.         {
  230.         case 1:
  231.             {
  232.             switch(listitem)
  233.             {
  234.                 case 0: //-----------------[Leave Airport]----------------//
  235.                 {
  236.                     SetPlayerPos(playerid,407.8798,2525.1943,16.7844);
  237.                     SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to LeavedAirport");
  238.                 }
  239.                 case 1: //----------------[LV Airport]-------------//
  240.                 {
  241.                     SetPlayerPos(playerid,1469.2806,1570.0126,10.8125);
  242.                     SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Las Venturas Airport");
  243.                 }
  244.                 case 2: //--------------[LS Airport]--------------//
  245.                 {
  246.                     SetPlayerPos(playerid,1986.5513,-2488.3906,13.5391);
  247.                     SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Los Santos Airport");
  248.                 }
  249.                 case 3: //--------------[SF Airport]--------------//
  250.                 {
  251.                     SetPlayerPos(playerid,-1266.8010,-119.0685,14.1440);
  252.                     SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to SF Airport");
  253.                 }
  254.                 case 4: //--------------[Groove Street]--------------//
  255.                 {
  256.                     SetPlayerPos(playerid,2493.0503,-1673.5786,13.3359);
  257.                     SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Groove Street");
  258.                 }
  259.                 case 5: //--------------[Area51]--------------//
  260.                 {
  261.                     SetPlayerPos(playerid,323.2570,2000.0634,17.6437);
  262.                     SendClientMessage(playerid, COLOR_INFO, "Sucessfuly teleported to Area51");
  263.                 }
  264.  
  265.             }
  266.             }
  267.     }
  268.     }
  269.  
  270.  
  271.    
  272.     return 1;
  273. }
  274.  
  275. COMMAND:menu(playerid, params[])
  276.     {
  277.         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What do you want?", "Gun Shop \nVehicles Shop \nTeleport Destinations", "Buy", "Cancel");
  278.         return 1;
  279.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement