AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Keys in show_menu and register_menucmd (https://forums.alliedmods.net/showthread.php?t=53553)

Afrow UK 04-06-2007 07:42

Keys in show_menu and register_menucmd
 
Do the keys for show_menu and register_menucmd have to match, or can I use different keys for show_menu when I call it.

Stu

Rolnaaba 04-06-2007 10:44

Re: Keys in show_menu and register_menucmd
 
?? that doesnt make sense your register the keys that you will use in the show_menu, when u use register_menucmd
Code:
#define MENU_KEYS (1<<0)|(1<<1)   register_menucmd(register_menuid("MENU NAME"), MENU_KEYS, "menu_handle"); register_clcmd("say /menu", "show_menu_func");   public show_menu_func(id) {     show_menu(id, MENU_KEYS, "WHAT MENU SAYS");     return PLUGIN_HANDLED; } public menu_handle(id, key) {     switch(key) {         case 1: client_print(id, print_chat, "MENU ITEM 1 SECLECTED");         case 2: client_print(id, print_chat, "MENU ITEM 2 SECLECTED");         default: return PLUGIN_HANDLED;     }     return PLUGIN_HANDLED; }


All times are GMT -4. The time now is 06:45.

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