Advertisement
iUzI

Weapon Shop v1.0 by Sly (GShock)

Apr 24th, 2015
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.50 KB | None | 0 0
  1. /*
  2. Title :- Weapon Shop v1.0
  3. Author :- Sly (GShock)
  4. SA-MP forum :- http://forum.sa-mp.com/member.php?u=212767
  5. Script link :- http://pastebin.com/VU2cMphQ
  6. */
  7.  
  8.  
  9.  
  10.  
  11.  
  12. #include <a_samp>
  13. #include <zcmd>
  14.  
  15. #define DIALOG_WEAPON 69    /* ( Change this ID if your gamemode already has a dialog with this ID) */
  16.  
  17.  
  18. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  19. {
  20.     if(dialogid == DIALOG_WEAPON)
  21.         {
  22.         if(response)
  23.         {
  24.             switch(listitem)
  25.             {
  26.                 case 0: ShowPlayerDialog(playerid, 70, DIALOG_STYLE_LIST, "Melee", "Brass Knuckles\nGolf Club\nNightstick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw", "Go", "Exit");
  27.                 case 1: ShowPlayerDialog(playerid, 71, DIALOG_STYLE_LIST, "Pistols", "9mm\nSilenced 9mm\nDesert Eagle", "Go", "Exit");
  28.                 case 2: ShowPlayerDialog(playerid, 72, DIALOG_STYLE_LIST, "Shotguns", "Shotgun\nSawnoff Shotgun\nCombat Shotgun", "Go", "Exit");
  29.                 case 3: ShowPlayerDialog(playerid, 73, DIALOG_STYLE_LIST, "Sub Machines", "Uzi\nMP5\nTec-9", "Go", "Exit");
  30.                 case 4: ShowPlayerDialog(playerid, 74, DIALOG_STYLE_LIST, "Rifles", "AK-47\nM4\nCountry Rifle\nSniper Rifle", "Go", "Exit");
  31.                 case 5: ShowPlayerDialog(playerid, 75, DIALOG_STYLE_LIST, "Thrown", "Tear Gas\nMolotov Cocktail", "Go", "Exit");
  32.                 case 6: ShowPlayerDialog(playerid, 76, DIALOG_STYLE_LIST, "Other", "Fire Extinguisher\nCamera", "Go", "Exit");
  33.             }
  34.         }
  35.     }
  36.     if(dialogid == 70)
  37.     {
  38.             if(response)
  39.             {
  40.                 switch(listitem)
  41.                 {
  42.                     case 0: GivePlayerWeapon(playerid, 1, 0x7FFFFFFF);
  43.                     case 1: GivePlayerWeapon(playerid, 2, 0x7FFFFFFF);
  44.                     case 2: GivePlayerWeapon(playerid, 3, 0x7FFFFFFF);
  45.                     case 3: GivePlayerWeapon(playerid, 4, 0x7FFFFFFF);
  46.                     case 4: GivePlayerWeapon(playerid, 5, 0x7FFFFFFF);
  47.                     case 5: GivePlayerWeapon(playerid, 6, 0x7FFFFFFF);
  48.                     case 6: GivePlayerWeapon(playerid, 7, 0x7FFFFFFF);
  49.                     case 7: GivePlayerWeapon(playerid, 8, 0x7FFFFFFF);
  50.                     case 8: GivePlayerWeapon(playerid, 9, 0x7FFFFFFF);
  51.                 }
  52.             }
  53.     }
  54.     if(dialogid == 71)
  55.     {
  56.             if(response)
  57.             {
  58.                 switch(listitem)
  59.                 {
  60.                     case 0: GivePlayerWeapon(playerid, 22, 0x7FFFFFFF);
  61.                     case 1: GivePlayerWeapon(playerid, 23, 0x7FFFFFFF);
  62.                     case 2: GivePlayerWeapon(playerid, 24, 0x7FFFFFFF);
  63.                 }
  64.             }
  65.     }
  66.     if(dialogid == 72)
  67.     {
  68.             if(response)
  69.             {
  70.                 switch(listitem)
  71.                 {
  72.                     case 0: GivePlayerWeapon(playerid, 25, 0x7FFFFFFF);
  73.                     case 1: GivePlayerWeapon(playerid, 26, 0x7FFFFFFF);
  74.                     case 2: GivePlayerWeapon(playerid, 27, 0x7FFFFFFF);
  75.                 }
  76.             }
  77.     }
  78.     if(dialogid == 73)
  79.     {
  80.             if(response)
  81.             {
  82.                 switch(listitem)
  83.                 {
  84.                     case 0: GivePlayerWeapon(playerid, 28, 0x7FFFFFFF);
  85.                     case 1: GivePlayerWeapon(playerid, 29, 0x7FFFFFFF);
  86.                     case 2: GivePlayerWeapon(playerid, 32, 0x7FFFFFFF);
  87.                 }
  88.             }
  89.         }
  90.     if(dialogid == 74)
  91.     {
  92.             if(response)
  93.             {
  94.                 switch(listitem)
  95.                 {
  96.                     case 0: GivePlayerWeapon(playerid, 30, 0x7FFFFFFF);
  97.                     case 1: GivePlayerWeapon(playerid, 31, 0x7FFFFFFF);
  98.                     case 2: GivePlayerWeapon(playerid, 33, 0x7FFFFFFF);
  99.                     case 3: GivePlayerWeapon(playerid, 34, 0x7FFFFFFF);
  100.                 }
  101.             }
  102.     }
  103.     if(dialogid == 75)
  104.     {
  105.             if(response)
  106.             {
  107.                 switch(listitem)
  108.                 {
  109.                     case 0: GivePlayerWeapon(playerid, 17, 5);
  110.                     case 1: GivePlayerWeapon(playerid, 18, 5);
  111.                 }
  112.             }
  113.         }
  114.     if(dialogid == 76)
  115.     {
  116.             if(response)
  117.             {
  118.                 switch(listitem)
  119.                 {
  120.                     case 0: GivePlayerWeapon(playerid, 42, 70);
  121.                     case 1: GivePlayerWeapon(playerid, 43, 0x7FFFFFFF);
  122.                 }
  123.             }
  124.     }
  125.     return 1;
  126. }
  127.  
  128. CMD:weaponshop(playerid, params[])
  129. {
  130.     ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "{00ff00}Weapon Shop by Sly", "Melee\nPistols\nShotguns\nSub Machines\nRifles\nThrown\nOther", "Next", "Exit");
  131.     SendClientMessage(playerid , -1 ,"This script it brought to you by Sly! (GShock)");
  132.     return 1;
  133. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement