AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   menu bugs (https://forums.alliedmods.net/showthread.php?t=110725)

solano 12-02-2009 10:29

menu bugs
 
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

Arkshine 12-02-2009 10:39

Re: menu bugs
 
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 )

solano 12-02-2009 10:46

Re: menu bugs
 
no i mean not the plugin im using all plugins dont register those buttons

xPaw 12-02-2009 11:03

Re: menu bugs
 
bind 6 slot6 ?


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

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