Guest User

Untitled

a guest
Apr 22nd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 12.63 KB | None | 0 0
  1.     if(strcmp(cmd, "/creategun",true) == 0 || strcmp(cmd, "/createweapon", true) == 0)
  2.     {
  3.         if(IsPlayerConnected(playerid))
  4.         {
  5.             if(SellGunTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY,"* You must wait 10 seconds before selling another weapon !");
  6.             new armslevel = PlayerInfo[playerid][pArmsSkill];
  7.             if(armslevel >= 0)
  8.             {
  9.                 ShowPlayerDialog(playerid, 9026, DIALOG_STYLE_LIST, "Create a Weapon (AD: 1)", "Knuckles (25 materials)\nBaseballbat (25 materials)\nPoolcue (25 materials)\nCane (25 materials)\nShovel (25 materials)\nGolfclub (25 materials)\nKatana (50 materials)\nColt 45 (150 materials)", "Create", "Cancel");
  10.             }
  11.             if(armslevel >= 50)
  12.             {
  13.                 ShowPlayerDialog(playerid, 9026, DIALOG_STYLE_LIST, "Create a Weapon (AD: 2)", "Knuckles (25 materials)\nBaseballbat (25 materials)\nPoolcue (25 materials)\nCane (25 materials)\nShovel (25 materials)\nGolfclub (25 materials)\nKatana (50 materials)\nColt 45 (150 materials)\nShotgun (750 materials)\nMP5 (1,200 materials)\nRifle (1,500 materials)", "Create", "Cancel");
  14.             }
  15.             if(armslevel >= 100)
  16.             {
  17.                 ShowPlayerDialog(playerid, 9026, DIALOG_STYLE_LIST, "Create a Weapon (AD: 3)", "Knuckles (25 materials)\nBaseballbat (25 materials)\nPoolcue (25 materials)\nCane (25 materials)\nShovel (25 materials)\nGolfclub (25 materials)\nKatana (50 materials)\nColt 45 (150 materials)\nShotgun (750 materials)\nMP5 (1,200 materials)\nRifle (1,500 materials)\nDeagle (4,000 materials)", "Create", "Cancel");
  18.             }
  19.             if(armslevel >= 200)
  20.             {
  21.                 ShowPlayerDialog(playerid, 9026, DIALOG_STYLE_LIST, "Create a Weapon (AD: 4)", "Knuckles (25 materials)\nBaseballbat (25 materials)\nPoolcue (25 materials)\nCane (25 materials)\nShovel (25 materials)\nGolfclub (25 materials)\nKatana (50 materials)\nColt 45 (150 materials)\nShotgun (750 materials)\nMP5 (1,200 materials)\nRifle (1,500 materials)\nDeagle (4,000 materials)\nAK47 (8,000 materials)\nM4 (8,000 materials)", "Create", "Cancel");
  22.             }
  23.             if(armslevel >= 400)
  24.             {
  25.                 ShowPlayerDialog(playerid, 9026, DIALOG_STYLE_LIST, "Create a Weapon (AD: 5)", "Knuckles (25 materials)\nBaseballbat (25 materials)\nPoolcue (25 materials)\nCane (25 materials)\nShovel (25 materials)\nGolfclub (25 materials)\nKatana (50 materials)\nColt 45 (150 materials)\nShotgun (750 materials)\nMP5 (1,200 materials)\nRifle (1,500 materials)\nDeagle (4,000 materials)\nAK47 (8,000 materials)\nM4 (8,000 materials)\nSniper Rifle (15,000 materials)\nSpas 12 (15,000 materials)", "Create", "Cancel");
  26.             }
  27.         }
  28.         return 1;
  29.     }
  30.  
  31.  
  32. //------------------------------------------------------------------------------------------
  33.  
  34.     if(dialogid == 9026)
  35.     {
  36.         if(response)
  37.         {
  38.             if(PlayerInfo[playerid][pJob] != 9) return SendClientMessage(playerid, COLOR_GREY,"* You are not an Arms Dealer !");
  39.            
  40.             switch(listitem)
  41.             {
  42.                 case 0: // Knuckles
  43.                 {
  44.                     if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
  45.                     GivePlayerGun(playerid, 1);
  46.                     PlayerInfo[playerid][pMats] -= 25;
  47.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  48.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  49.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  50.                 }
  51.                 case 1: // Baseballbat
  52.                 {
  53.                     if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
  54.                     GivePlayerGun(playerid, 5);
  55.                     PlayerInfo[playerid][pMats] -= 25;
  56.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  57.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  58.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  59.                 }
  60.                 case 2: // Poolcue
  61.                 {
  62.                     if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
  63.                     GivePlayerGun(playerid, 7);
  64.                     PlayerInfo[playerid][pMats] -= 25;
  65.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  66.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  67.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  68.                 }
  69.                 case 3: // Cane
  70.                 {
  71.                     if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
  72.                     GivePlayerGun(playerid, 15);
  73.                     PlayerInfo[playerid][pMats] -= 25;
  74.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  75.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  76.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  77.                 }
  78.                 case 4: // Shovel
  79.                 {
  80.                     if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
  81.                     GivePlayerGun(playerid, 6);
  82.                     PlayerInfo[playerid][pMats] -= 25;
  83.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  84.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  85.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  86.                 }
  87.                 case 5: // Golfclub
  88.                 {
  89.                     if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
  90.                     GivePlayerGun(playerid, 2);
  91.                     PlayerInfo[playerid][pMats] -= 25;
  92.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  93.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  94.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  95.                 }
  96.                 case 6: // Katana
  97.                 {
  98.                     if(PlayerInfo[playerid][pMats] < 50) return SendClientMessage(playerid, COLOR_GREY,"* You need 50 materials to create this weapon.");
  99.                     GivePlayerGun(playerid, 7);
  100.                     PlayerInfo[playerid][pMats] -= 50;
  101.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  102.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  103.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  104.                 }
  105.                 case 7: // Colt45
  106.                 {
  107.                     if(PlayerInfo[playerid][pMats] < 150) return SendClientMessage(playerid, COLOR_GREY,"* You need 150 materials to create this weapon.");
  108.                     GivePlayerGun(playerid, 22);
  109.                     PlayerInfo[playerid][pMats] -= 150;
  110.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  111.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  112.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  113.                 }
  114.                 case 8: // Shotgun
  115.                 {
  116.                     if(PlayerInfo[playerid][pMats] < 750) return SendClientMessage(playerid, COLOR_GREY,"* You need 750 materials to create this weapon.");
  117.                     GivePlayerGun(playerid, 25);
  118.                     PlayerInfo[playerid][pMats] -= 750;
  119.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  120.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  121.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  122.                 }
  123.                 case 9: // MP5
  124.                 {
  125.                     if(PlayerInfo[playerid][pMats] < 1200) return SendClientMessage(playerid, COLOR_GREY,"* You need 1,200 materials to create this weapon.");
  126.                     GivePlayerGun(playerid, 29);
  127.                     PlayerInfo[playerid][pMats] -= 1200;
  128.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  129.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  130.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  131.                 }
  132.                 case 10: // Rifle
  133.                 {
  134.                     if(PlayerInfo[playerid][pMats] < 1500) return SendClientMessage(playerid, COLOR_GREY,"* You need 1,500 materials to create this weapon.");
  135.                     GivePlayerGun(playerid, 33);
  136.                     PlayerInfo[playerid][pMats] -= 1500;
  137.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  138.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  139.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  140.                 }
  141.                 case 11: // Deagle
  142.                 {
  143.                     if(PlayerInfo[playerid][pMats] < 4000) return SendClientMessage(playerid, COLOR_GREY,"* You need 4,000 materials to create this weapon.");
  144.                     GivePlayerGun(playerid, 24);
  145.                     PlayerInfo[playerid][pMats] -= 4000;
  146.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  147.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  148.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  149.                 }
  150.                 case 12: // AK 47
  151.                 {
  152.                     if(PlayerInfo[playerid][pMats] < 8000) return SendClientMessage(playerid, COLOR_GREY,"* You need 8,000 materials to create this weapon.");
  153.                     GivePlayerGun(playerid, 30);
  154.                     PlayerInfo[playerid][pMats] -= 8000;
  155.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  156.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  157.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  158.                 }
  159.                 case 13: // M4
  160.                 {
  161.                     if(PlayerInfo[playerid][pMats] < 8000) return SendClientMessage(playerid, COLOR_GREY,"* You need 8,000 materials to create this weapon.");
  162.                     GivePlayerGun(playerid, 31);
  163.                     PlayerInfo[playerid][pMats] -= 8000;
  164.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  165.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  166.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  167.                 }
  168.                 case 14: // Sniper
  169.                 {
  170.                     if(PlayerInfo[playerid][pMats] < 15000) return SendClientMessage(playerid, COLOR_GREY,"* You need 15,000 materials to create this weapon.");
  171.                     GivePlayerGun(playerid, 34);
  172.                     PlayerInfo[playerid][pMats] -= 15000;
  173.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  174.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  175.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  176.                 }
  177.                 case 15: // Spas-12
  178.                 {
  179.                     if(PlayerInfo[playerid][pMats] < 15000) return SendClientMessage(playerid, COLOR_GREY,"* You need 15,000 materials to create this weapon.");
  180.                     GivePlayerGun(playerid, 27);
  181.                     PlayerInfo[playerid][pMats] -= 15000;
  182.                     format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
  183.                     ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  184.                     if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
  185.                 }
  186.             }
  187.             return 1;
  188.         }
  189.         return 1;
  190.     }
Add Comment
Please, Sign In to add comment