AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu within a menu (https://forums.alliedmods.net/showthread.php?t=28758)

SuperDuper 05-21-2006 23:42

Menu within a menu
 
I am doing a plugin so that when you are bored with 2 noobs running in circles trying to find each other, why not treat your self to some jokes? I need to make a menu, inside another menu and im having trouble, this is what i have so far, mind giving some tips?

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "joke_menu" #define VERSION "1.0" #define AUTHOR "superduper" #define JokeMeMenu (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8) // Keys: 123456789 public plugin_init() {     register_plugin("Joke_menu","1.0","SuperDuper")         register_cvar("funny","1")     register_cvar("funnier", "500")     register_cvar("quotes", "500")     register_cvar("catchlines", "500")         register_clcmd( "joke_me","ShowJokeMeMenu")         set_task(0.1,"fast",0,"",0,"b")     g_nMsgScreenFade = get_user_msgid("ScreenFade")     } public ShowJokeMeMenu(id) {     show_menu(id, KeysJokeMeMenu, "Menu: ^n1: ^n2: ^n3:^n4:  ^n", -1, "JokeMeMenu") // Display menu } public PressedJokeMeMenu(id, key) {     /* Menu:     * Menu:     * 1:  Funny     * 2:  Funnier     * 3:  Quotes     * 4:  Catchlines     */         switch (key) {         case 0: { // 1             if(get_cvar_num("sv_JokeMe") == 0)             {                 client_print(id, print_chat, "[PFI] This Plugin Is Disabled.")                 return PLUGIN_HANDLED                 }

And thank you "Onfirenburnin420" i am using your layout.

Hawk552 05-22-2006 08:37

You never registered the menu. You'll either need to register 2 or do more complex coding.

Code:
register_menucmd(register_menuid(name[]),keys,function[])


All times are GMT -4. The time now is 16:19.

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