Advertisement
Guest User

Private200 - Weapons+Skins FS

a guest
Feb 22nd, 2013
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.69 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. /*         Weapons Dialog
  5.                 by
  6.             Private200          */
  7.  
  8. //=======================[Colors]====================
  9. #define COLOR_LIGHTBLUE 0x33CCFFAA
  10. #define COLOR_RED 0xAA3333AA
  11. #define COLOR_GREY 0xAFAFAFAA
  12. #define COLOR_YELLOW 0xFFFF00AA
  13. #define COLOR_PINK 0xFF66FFAA
  14. #define COLOR_BLUE 0x0000BBAA
  15. #define COLOR_WHITE 0xFFFFFFAA
  16. #define COLOR_ORANGE 0xFF9900AA
  17. #define COLOR_GREY 0xAFAFAFAA
  18. #define COLOR_GREEN 0x33AA33AA
  19. #define COLOR_RED 0xAA3333AA
  20.  
  21. //=======================[End of Colors]======================
  22.  
  23. #define DIALOG_WEAPONS 1337
  24. #define DIALOG_WEAPONS1 1338
  25.  
  26. public OnFilterScriptInit()
  27. {
  28.     print("\n--------------------------------------");
  29.     print(" Weapons FS by Private200");
  30.     print("--------------------------------------\n");
  31.     return 1;
  32. }
  33.  
  34. public OnFilterScriptExit()
  35. {
  36.     return 1;
  37. }
  38. CMD:shop(playerid, cmdtext[])
  39. {
  40.     ShowPlayerDialog(playerid, DIALOG_WEAPONS1, DIALOG_STYLE_LIST, "Chose below. Go to the next step:", "Weapons \nSkin", "Search", "Cancel");
  41.     return 1;
  42. }
  43.  
  44. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  45. {
  46.  
  47.     if(dialogid == DIALOG_WEAPONS1)
  48.     {
  49.         if(response)
  50.         {
  51.             if(listitem == 0)
  52.             {
  53.                 ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Chose below. Go to the next step:", "Melee Weapons \nPistols\nShotguns\nSub-Machine Guns\nRifles\nJetpack\nCamera\nMinigun", "Search", "Cancel");
  54.             }
  55.             if(listitem == 1)
  56.             {
  57.                 ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_INPUT, "Skin Changer", "Type the skin ID here(0-299):", "Submit", "Cancel");
  58.             }
  59.             return 1;
  60.         }
  61.     }
  62.  
  63.     if(dialogid == 5000)
  64.     {
  65.         if(response)
  66.         {
  67.             new skinid, message[64];
  68.             skinid = strval(inputtext);
  69.             if(skinid < 0 || skinid > 299)
  70.             {
  71.                 SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Skin id may be between 0 and 299.");
  72.             }
  73.             else
  74.             {
  75.                 SetPlayerSkin(playerid, skinid);
  76.                 format(message, sizeof(message), "SERVER: You have changed your skin id to %d.", skinid);
  77.                 SendClientMessage(playerid, 0xFFFFFFFF, message);
  78.             }
  79.         }
  80.         return 1;
  81.     }
  82.    
  83.     if(dialogid == DIALOG_WEAPONS)
  84.     {
  85.         if(response)
  86.         {
  87.             if(listitem == 0)
  88.             {
  89.                 ShowPlayerDialog(playerid, DIALOG_WEAPONS+1, DIALOG_STYLE_LIST, "Chose your melee weapon:", "Brass Knuckles \nGolf Club\nKnife\nBaseball bat\nChainsaw", "Get", "Cancel");
  90.             }
  91.             if(listitem == 1)
  92.             {
  93.                 ShowPlayerDialog(playerid, DIALOG_WEAPONS+2, DIALOG_STYLE_LIST, "Chose your pistol:", "9MM \nSilenced 9mm\nDesert Eagle", "Get", "Cancel");
  94.             }
  95.             if(listitem == 2)    // The third item listed
  96.             {
  97.                 ShowPlayerDialog(playerid, DIALOG_WEAPONS+3, DIALOG_STYLE_LIST, "Chose your pistol:", "Shotgun \nSawnoff Shotgun\nCombat Shotgun", "Get", "Cancel");
  98.             }
  99.             if(listitem == 3)    //The third item listed
  100.             {
  101.                 ShowPlayerDialog(playerid, DIALOG_WEAPONS+4, DIALOG_STYLE_LIST, "Chose your pistol:", "Micro UZI \nMP5\nAK-47\nM4\nTec-9", "Get", "Cancel");
  102.             }
  103.             if(listitem == 4) //The fourth item listed
  104.             {
  105.                 ShowPlayerDialog(playerid, DIALOG_WEAPONS+5, DIALOG_STYLE_LIST, "Chose your pistol:", "Country Rifle \nSniper Rifle", "Get", "Cancel");
  106.             }
  107.             if(listitem == 5) //The fourth item listed
  108.             {
  109.                 SetPlayerSpecialAction(playerid,2);
  110.             }
  111.             if(listitem == 6) //The fourth item listed
  112.             {
  113.                 GivePlayerWeapon(playerid, 43, 50000);
  114.             }
  115.             if(listitem == 7) //The fourth item listed
  116.             {
  117.                 GivePlayerWeapon(playerid, 38, 50000);
  118.             }
  119.         }
  120.         return 1;
  121.     }
  122.  
  123.     if(dialogid == DIALOG_WEAPONS+1)
  124.     {
  125.         if(response)
  126.         {
  127.             if(listitem == 0)
  128.             {
  129.                 GivePlayerWeapon(playerid, 1, 5);
  130.             }
  131.             if(listitem == 1)
  132.             {
  133.                 GivePlayerWeapon(playerid, 2, 2);
  134.             }
  135.             if(listitem == 2)
  136.             {
  137.                 GivePlayerWeapon(playerid, 4, 2);
  138.             }
  139.             if(listitem == 3)
  140.             {
  141.                 GivePlayerWeapon(playerid, 5, 2);
  142.             }
  143.             if(listitem == 4)
  144.             {
  145.                 GivePlayerWeapon(playerid, 9, 2);
  146.             }
  147.         }
  148.         return 1;
  149.     }
  150.     if(dialogid == DIALOG_WEAPONS+2)
  151.     {
  152.         if(response)
  153.         {
  154.             if(listitem == 0)
  155.             {
  156.                 GivePlayerWeapon(playerid, 22, 50000);
  157.             }
  158.             if(listitem == 1)
  159.             {
  160.                 GivePlayerWeapon(playerid, 23, 50000);
  161.             }
  162.             if(listitem == 2)
  163.             {
  164.                 GivePlayerWeapon(playerid, 24, 50000);
  165.             }
  166.         }
  167.         return 1;
  168.     }
  169.     if(dialogid == DIALOG_WEAPONS+3)
  170.     {
  171.         if(response)
  172.         {
  173.             if(listitem == 0)
  174.             {
  175.                 GivePlayerWeapon(playerid, 25, 50000);
  176.             }
  177.             if(listitem == 1)
  178.             {
  179.                 GivePlayerWeapon(playerid, 26, 50000);
  180.             }
  181.             if(listitem == 2)
  182.             {
  183.                 GivePlayerWeapon(playerid, 27, 50000);
  184.             }
  185.         }
  186.         return 1;
  187.     }
  188.     if(dialogid == DIALOG_WEAPONS+4)
  189.     {
  190.         if(response)
  191.         {
  192.             if(listitem == 0)
  193.             {
  194.                 GivePlayerWeapon(playerid, 28, 50000);
  195.             }
  196.             if(listitem == 1)
  197.             {
  198.                 GivePlayerWeapon(playerid, 29, 50000);
  199.             }
  200.             if(listitem == 2)
  201.             {
  202.                 GivePlayerWeapon(playerid, 30, 50000);
  203.             }
  204.             if(listitem == 3)
  205.             {
  206.                 GivePlayerWeapon(playerid, 31, 50000);
  207.             }
  208.             if(listitem == 4)
  209.             {
  210.                 GivePlayerWeapon(playerid, 32, 50000);
  211.             }
  212.         }
  213.         return 1;
  214.     }
  215.     if(dialogid == DIALOG_WEAPONS+5)
  216.     {
  217.         if(response)
  218.         {
  219.             if(listitem == 0)
  220.             {
  221.                 GivePlayerWeapon(playerid, 33, 50000);
  222.             }
  223.             if(listitem == 1)
  224.             {
  225.                 GivePlayerWeapon(playerid, 34, 50000);
  226.             }
  227.         }
  228.         return 1;
  229.     }
  230.  
  231.     return 0;
  232.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement