Raised This Month: $ Target: $400
 0% 

menu bugs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
solano
Member
Join Date: Nov 2009
Old 12-02-2009 , 10:29   menu bugs
Reply With Quote #1

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

Last edited by solano; 12-02-2009 at 10:34.
solano is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode