27.01.2011, 09:48
ok so i have 1 dialog menu works fine and im trying 2 make another but when i click buy on my 2nd menu works if i click buy on my 1st menu it comes up with the text on the 2nd menu
heres the code
please help thanks
heres the code
Код:
if(dialogid == cluckmenu) { if(response) { if(listitem == 0) // clucking food { if(GetPlayerMoney(playerid) < 40 ) return SendClientMessage(playerid,0x33CCFFAA,"NOOB YOU CANT BUY DIS SHIT"); GivePlayerMoney(playerid,-40); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}NIGGA YOU BOUGHT SOME GOOD SHIT"); } } return 1; } if(dialogid == gmenu) { if(response) { if(listitem == 0) // chainsaw { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 20000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 20000$ For A Chainsaw"); GivePlayerMoney(playerid,-20000); GivePlayerWeapon(playerid, 9, 1); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought A Chainsaw For 20000$"); } if(listitem == 1) // grenade { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 10000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 10000$ For Grenade's"); GivePlayerMoney(playerid,-10000); GivePlayerWeapon(playerid, 16, 10); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought Grenade's For 10000$"); } if(listitem == 2) // Sawn-off-shotgun { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 30000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 30000$ For Sawn-Off-Shotgun"); GivePlayerMoney(playerid,-30000); GivePlayerWeapon(playerid, 26, 50); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought Sawn-Off-Shotgun's For 30000$"); } if(listitem == 3) // mac9 { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 15000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 15000$ For Mac9's"); GivePlayerMoney(playerid,-15000); GivePlayerWeapon(playerid, 28, 200); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought Mac9's's For 15000$"); } if(listitem == 4) // mp5 { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 22500 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 22500$ For A MP5"); GivePlayerMoney(playerid,-22500); GivePlayerWeapon(playerid, 29, 300); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought A MP5 For 22500$"); } if(listitem == 5) // ak47 { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 40000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 40000$ For A Ak-47"); GivePlayerMoney(playerid,-40000); GivePlayerWeapon(playerid, 30, 230); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought A AK-47 For 40000$"); } if(listitem == 6) // combatshotgun { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 18000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 18000$ For A Combat Shotgun"); GivePlayerMoney(playerid,-18000); GivePlayerWeapon(playerid, 27, 15); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought A Combat Shotgun For 18000$"); } if(listitem == 7) // sniper rifle { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 25000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 25000$ For A Sniper Rifle"); GivePlayerMoney(playerid,-25000); GivePlayerWeapon(playerid, 34, 25); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought A Sniper Rifle For 25000$"); } if(listitem == 8) // rocket launcher { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 70000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 70000$ For A Rocket Launcher"); GivePlayerMoney(playerid,-70000); GivePlayerWeapon(playerid, 35, 10); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought A Rocket Launcher For 70000$"); } if(listitem == 9) // armour { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 4000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 4000$ For Armour"); GivePlayerMoney(playerid,-4000); SetPlayerArmour(playerid,100); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought Armour For 4000$"); } if(listitem == 10) // gas { ShowPlayerDialog(playerid, gmenu, DIALOG_STYLE_LIST, "{FFAF00}Ammunation Protecting Your Rights!", "Chainsaw {6EF83C}20000$ \nGrenade {6EF83C}10000$ \nSawn-Off-Shotgun {6EF83C}30000$ \nMac9 {6EF83C}15000$ \nMP5 {6EF83C}22500$ \nAK-47 {6EF83C}40000$ \nCombat Shotgun {6EF83C}18000$ \nSniper Rifle {6EF83C}25000$\nRocket Launcher {6EF83C}70000$\nArmour {6EF83C}4000$\nTurban Gas{6EF83C} 4000$", "Buy", "Cancel"); if(GetPlayerMoney(playerid) < 4000 ) return SendClientMessage(playerid,0x33CCFFAA,"You Dont Have 4000$ For Gas"); GivePlayerMoney(playerid,-4000); GivePlayerWeapon(playerid, 41, 150); SendClientMessage(playerid, 0xFFFFFFFF, "{FF00EA}You Bought Gas For 4000$"); } } return 1; } return 0; }