Code:
new MainMenu;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_mhspawn","SpawnEditorMain",ADMIN_MAP,"Opens the spawn editor");
}
public MH_menu_handler( const id, const menu, const item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public SpawnEditorMain()
{
MainMenu=menu_create("\rMH Spawn Editor:", "MH_menu_handler");
menu_additem(MainMenu, "Monster Spawns", "1", 0);
menu_additem(MainMenu, "Player Spanws", "2", 0);
menu_additem(MainMenu, "Scientist Spawn", "3", 0);
menu_additem(MainMenu, "Weapon Spanws", "4", 0);
menu_additem(MainMenu, "Ammo Spawns","5",0);
menu_display(1,MainMenu,0)
return PLUGIN_HANDLED;
}
running half life server with amx mod x 1.8.1
this is the code im using and the menu doest register keys:
6,7,8,9 and 0 when i press them nothing happens i even cant exit the menu and have to restart the server