Raised This Month: $ Target: $400
 0% 

menu bugs


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-02-2009 , 10:39   Re: menu bugs
Reply With Quote #2

Quote:
the menu doest register keys:
6,7,8,9 and 0
It sounds logic since you don't use theses keys...

Quote:
and 0 when i press them nothing happens i even cant exit the menu
Again, normal behavior, you don't tell you want an exit key. You have to use menu_setprop().

Take a look in the newmenus natives before. ( newmenus.inc )
__________________
Arkshine is offline
solano
Member
Join Date: Nov 2009
Old 12-02-2009 , 10:46   Re: menu bugs
Reply With Quote #3

no i mean not the plugin im using all plugins dont register those buttons
solano is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 12-02-2009 , 11:03   Re: menu bugs
Reply With Quote #4

bind 6 slot6 ?
__________________
xPaw is offline
Reply



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