I was making a gun buy menu, but when they select the gun type how do I make it go to another menu displaying the guns? Here's my current code.
Code:
new g_Menu
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /guns", "Menu_Command")
g_Menu = menu_create("Weapon menu", "Menu_Handle")
menu_additem(g_Menu, "Pistol", "1")
menu_additem(g_Menu, "SMG", "2")
menu_additem(g_Menu, "Rifle", "3")
menu_additem(g_Menu, "Other", "4")
}
public Menu_Command(id, level, cid)
{
menu_display(id, g_Menu, 0)
return PLUGIN_HANDLED
}
public Menu_Handle(id, Menu, Item)
{
new szCommand[3], Accesss, Callback
menu_item_getinfo(Menu, Item, Accesss, szCommand, 2, _, _, Callback)
switch(szCommand[0])
{
case '-':
{
return PLUGIN_HANDLED
}
case '1':
{
client_print(id,print_chat,"No function yet")
}
case '2':
{
client_print(id,print_chat,"No function yet")
}
case '3':
{
client_print(id,print_chat,"No function yet")
}
case '4':
{
client_print(id,print_chat,"No function yet")
}
}
return PLUGIN_HANDLED
}