menu problem
#1

i got a problem with the menu

each time i want to open it it crashes

but when i compile no warnings or errors here is it

new Menu:Gunmenu;

Gunmenu = CreateMenu("Emmet's gun store", 1,20,120,150,40);

AddMenuItem(Gunmenu, 0, "Meele weapons");
AddMenuItem(Gunmenu, 0, "Handguns");
AddMenuItem(Gunmenu, 0, "Shotguns");
AddMenuItem(Gunmenu, 0, "Machine guns");
AddMenuItem(Gunmenu, 0, "Assault Rifles");
AddMenuItem(Gunmenu, 0, "Rifles");
AddMenuItem(Gunmenu, 0, "Exit");


if(strcmp("/buyweapon", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, 2441.9558,-1973.5205,13.5469) || IsPlayerInRangeOfPoint(playerid,1.5,2442.4368,-1979.7991,13.5469))
{
ShowMenuForPlayer(Gunmenu,playerid);
SendClientMessage(playerid,RED, "Emmet: Welcome to my gun shop young man! This is the best merchandise in South Central, come and pick your gun, soldier!");
TogglePlayerControllable(playerid,0);
return 1;
}
else
{
SendClientMessage(playerid,RED,"INFO: You're not at emmet's gunshop!");
}
return 1;
}



if(GetPlayerMenu(playerid) == Gunmenu)
{
switch(row)
{
case 0: //Melee weapons
{
ShowMenuForPlayer(Melee,playerid);
HideMenuForPlayer(Gunmenu,playerid);
TogglePlayerControllable(playerid,0);
}
case 1: //Handguns
{
HideMenuForPlayer(Gunmenu,playerid);
ShowMenuForPlayer(Handguns,playerid);
TogglePlayerControllable(playerid,0);
}
case 2: //Shotguns
{
HideMenuForPlayer(Gunmenu,playerid);
ShowMenuForPlayer(Shotguns,playerid);
TogglePlayerControllable(playerid,0);
}
case 3: //Machine guns
{
HideMenuForPlayer(Gunmenu,playerid);
ShowMenuForPlayer(Machine,playerid);
TogglePlayerControllable(playerid,0);
}
case 4: //Assault Rifles
{
HideMenuForPlayer(Gunmenu,playerid);
ShowMenuForPlayer(Assault,playerid);
TogglePlayerControllable(playerid,0);
}
case 5: //Rifles
{
HideMenuForPlayer(Gunmenu,playerid);
ShowMenuForPlayer(Rifle,playerid);
TogglePlayerControllable(playerid,0);
}
case 6: //Exit
{
HideMenuForPlayer(Gunmenu,playerid);
TogglePlayerControllable(playerid,1);
}
}

}
Reply


Messages In This Thread
menu problem - by stix - 16.12.2010, 23:23
Re: menu problem - by Nibblet - 16.12.2010, 23:28
Re: menu problem - by stix - 16.12.2010, 23:32
Re: menu problem - by Nibblet - 16.12.2010, 23:48
Re: menu problem - by stix - 17.12.2010, 00:02
Re: menu problem - by Nibblet - 17.12.2010, 00:03
Re: menu problem - by [XA]PuNi$HeR_ - 17.12.2010, 00:05

Forum Jump:


Users browsing this thread: 1 Guest(s)