Quote:
Originally Posted by HowToRuski
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?
|
try this one
PHP Code:
#include <amxmodx>
public client_connect(id)
{
client_cmd(id,"bind m ^"chooseteam^"");
}
public plugin_init()
{
register_clcmd( "chooseteam","mainmenu" );
}
public mainmenu( id )
{
new menu = menu_create( "\rLook at this awesome Menu!:", "menu_handler" );
menu_additem( menu, "\wI'm Selection #1", "", 0 );
menu_additem( menu, "\wI'm Selection #2", "", 0 );
menu_additem( menu, "\wI'm Secret Selection #3", "", ADMIN_ADMIN );
menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
menu_display( id, menu, 0 );
}
public menu_handler( id, menu, item )
{
switch( item )
{
case 0:
{
client_print( id, print_chat, "Hooray! You selected the Awesome 1st Selection" );
menu_destroy( menu );
return PLUGIN_HANDLED;
}
case 1:
{
client_print( id, print_chat, "OH NO! You selected the Awesome 2nd Selection! BEWARE!" );
}
case 2:
{
client_print( id, print_chat, "You have selected the Awesome Admin Selection! Hail Teh Bail!" );
}
case MENU_EXIT:
{
client_print( id, print_chat, "You exited the menu... what a bummer!" );
}
}
menu_destroy( menu );
return 1;
}