Here is the code from the link Avalanche gave , it is Xeroblood's tutorial to make menus , works for AMX Mod and AMX Mod X. All you have to do is change #include <amxmod> to #include <amxmodx> but I did that for you , I added comments where you put the client commands , and where you put the messages you want when that client uses that command. :
Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd( "say /menu","ShowMenu", -1, "Shows The menu" )
register_menucmd(register_menuid("\yFirst Menu:"), 1023, "MenuCommand" )
return PLUGIN_CONTINUE
}
public ShowMenu( id )
{
new szMenuBody[256]
new keys
format( szMenuBody, 255, "\yFirst Menu:^n" )
add( szMenuBody, 255, "^n\w1. First Option Name" )
add( szMenuBody, 255, "^n\w2. Second Option Name" )
add( szMenuBody, 255, "^n\w3. Third Option Name" )
add( szMenuBody, 255, "^n\w4. Fourth Option Name" )
add( szMenuBody, 255, "^n\w5. Fifth Option Name" )
add( szMenuBody, 255, "^n\w6. Sixth Option Name" )
add( szMenuBody, 255, "^n\w7. Seventh Option Name" )
add( szMenuBody, 255, "^n\w8. Eighth Option Name" )
add( szMenuBody, 255, "^n\w9. Ninth Option Name" )
add( szMenuBody, 255, "^n^n\w0. Exit Option Name" )
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
show_menu( id, keys, szMenuBody, -1 )
return PLUGIN_CONTINUE
}
public MenuCommand( id, key )
{
client_print( id, print_console, "[AMX] Key=%d", key )
client_print( id, print_chat, "[AMX] Key=%d", key )
switch( key )
{
case 0:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 1:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 2:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 3:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 4:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 5:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 6:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 7:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 8:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
case 9:
// Put your client message hereclient_print( id, print_chat, "Text")
// Put your client command here
}
return PLUGIN_HANDLED
}