Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/creategun",true) == 0 || strcmp(cmd, "/createweapon", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(SellGunTimer[playerid]) return SendClientMessage(playerid,COLOR_GREY,"* You must wait 10 seconds before selling another weapon !");
- new armslevel = PlayerInfo[playerid][pArmsSkill];
- if(armslevel >= 0)
- {
- 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");
- }
- if(armslevel >= 50)
- {
- 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");
- }
- if(armslevel >= 100)
- {
- 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");
- }
- if(armslevel >= 200)
- {
- 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");
- }
- if(armslevel >= 400)
- {
- 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");
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------
- if(dialogid == 9026)
- {
- if(response)
- {
- if(PlayerInfo[playerid][pJob] != 9) return SendClientMessage(playerid, COLOR_GREY,"* You are not an Arms Dealer !");
- switch(listitem)
- {
- case 0: // Knuckles
- {
- if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
- GivePlayerGun(playerid, 1);
- PlayerInfo[playerid][pMats] -= 25;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 1: // Baseballbat
- {
- if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
- GivePlayerGun(playerid, 5);
- PlayerInfo[playerid][pMats] -= 25;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 2: // Poolcue
- {
- if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
- GivePlayerGun(playerid, 7);
- PlayerInfo[playerid][pMats] -= 25;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 3: // Cane
- {
- if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
- GivePlayerGun(playerid, 15);
- PlayerInfo[playerid][pMats] -= 25;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 4: // Shovel
- {
- if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
- GivePlayerGun(playerid, 6);
- PlayerInfo[playerid][pMats] -= 25;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 5: // Golfclub
- {
- if(PlayerInfo[playerid][pMats] < 25) return SendClientMessage(playerid, COLOR_GREY,"* You need 25 materials to create this weapon.");
- GivePlayerGun(playerid, 2);
- PlayerInfo[playerid][pMats] -= 25;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 6: // Katana
- {
- if(PlayerInfo[playerid][pMats] < 50) return SendClientMessage(playerid, COLOR_GREY,"* You need 50 materials to create this weapon.");
- GivePlayerGun(playerid, 7);
- PlayerInfo[playerid][pMats] -= 50;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 7: // Colt45
- {
- if(PlayerInfo[playerid][pMats] < 150) return SendClientMessage(playerid, COLOR_GREY,"* You need 150 materials to create this weapon.");
- GivePlayerGun(playerid, 22);
- PlayerInfo[playerid][pMats] -= 150;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 8: // Shotgun
- {
- if(PlayerInfo[playerid][pMats] < 750) return SendClientMessage(playerid, COLOR_GREY,"* You need 750 materials to create this weapon.");
- GivePlayerGun(playerid, 25);
- PlayerInfo[playerid][pMats] -= 750;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 9: // MP5
- {
- if(PlayerInfo[playerid][pMats] < 1200) return SendClientMessage(playerid, COLOR_GREY,"* You need 1,200 materials to create this weapon.");
- GivePlayerGun(playerid, 29);
- PlayerInfo[playerid][pMats] -= 1200;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 10: // Rifle
- {
- if(PlayerInfo[playerid][pMats] < 1500) return SendClientMessage(playerid, COLOR_GREY,"* You need 1,500 materials to create this weapon.");
- GivePlayerGun(playerid, 33);
- PlayerInfo[playerid][pMats] -= 1500;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 11: // Deagle
- {
- if(PlayerInfo[playerid][pMats] < 4000) return SendClientMessage(playerid, COLOR_GREY,"* You need 4,000 materials to create this weapon.");
- GivePlayerGun(playerid, 24);
- PlayerInfo[playerid][pMats] -= 4000;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 12: // AK 47
- {
- if(PlayerInfo[playerid][pMats] < 8000) return SendClientMessage(playerid, COLOR_GREY,"* You need 8,000 materials to create this weapon.");
- GivePlayerGun(playerid, 30);
- PlayerInfo[playerid][pMats] -= 8000;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 13: // M4
- {
- if(PlayerInfo[playerid][pMats] < 8000) return SendClientMessage(playerid, COLOR_GREY,"* You need 8,000 materials to create this weapon.");
- GivePlayerGun(playerid, 31);
- PlayerInfo[playerid][pMats] -= 8000;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 14: // Sniper
- {
- if(PlayerInfo[playerid][pMats] < 15000) return SendClientMessage(playerid, COLOR_GREY,"* You need 15,000 materials to create this weapon.");
- GivePlayerGun(playerid, 34);
- PlayerInfo[playerid][pMats] -= 15000;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- case 15: // Spas-12
- {
- if(PlayerInfo[playerid][pMats] < 15000) return SendClientMessage(playerid, COLOR_GREY,"* You need 15,000 materials to create this weapon.");
- GivePlayerGun(playerid, 27);
- PlayerInfo[playerid][pMats] -= 15000;
- format(string, sizeof(string), "* %s creates a weapon from materials.", PlayerName(playerid));
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- if(PlayerInfo[playerid][pAdmin] < 1337) SellGunTimer[playerid] = 1; SetTimerEx("SellGun",10*1000,0,"i",playerid);
- }
- }
- return 1;
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment