View Single Post
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 08-28-2020 , 10:37   AMXX Menu system / chooseteam
Reply With Quote #1

Hello.
So far i got it right, no compile errors or something else, but when i enter server and press M button it doesnt show the menu but team choose, any solutions?

PHP Code:
 #include <amxmodx>

 
public plugin_init()
 {
    
register_clcmd"chooseteam","mainmenu" );
 }
 public 
mainmenuid )
 {
    new 
menu menu_create"\rLook at this awesome Menu!:""menu_handler" );
    
menu_additemmenu"\wI'm Selection #1""");
    
menu_additemmenu"\wI'm Selection #2""");
    
menu_additemmenu"\wI'm Secret Selection #3"""ADMIN_ADMIN );
    
menu_setpropmenuMPROP_EXITMEXIT_ALL );
    
menu_displayidmenu);
 }
 public 
menu_handleridmenuitem )
 {
    switch( 
item )
    {
        case 
0:
        {
            
client_printidprint_chat"Hooray! You selected the Awesome 1st Selection" );
            
            
menu_destroymenu );
            return 
PLUGIN_HANDLED;
        }
        case 
1:
        {
            
client_printidprint_chat"OH NO! You selected the Awesome 2nd Selection! BEWARE!" );
        }
        case 
2:
        {
            
client_printidprint_chat"You have selected the Awesome Admin Selection! Hail Teh Bail!" );
        }
        case 
MENU_EXIT:
        {
            
client_printidprint_chat"You exited the menu... what a bummer!" );
        }
    }
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
 } 

Last edited by HowToRuski; 08-28-2020 at 10:37.
HowToRuski is offline