try this
Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd("amx_menu","CmdMenu",ADMIN_MENU, "- Displays The menu")
register_menucmd(register_menuid("Hook Menu"),1023,"actionMenu")
return PLUGIN_CONTINUE
}
/*-------------------------------------Main Menu------------------------------------------------*/
public actionMenu(id, key) {
switch(key) {
case 0: {
client_cmd(id,"amx_command")
}
case 1: {
client_cmd(id,"amx_command2")
}
}
return PLUGIN_HANDLED
}
public CmdMenu(id, level, cid) {
if (!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
new menu[256]
format(menu, 255, "\yname of menu^n^n\w1. command name^n\w2. command name2^n\w0. Exit")
show_menu(id,((1<<0)|(1<<1)|(1<<2)), menu)
return PLUGIN_HANDLED
}
this is only for 2 commands want more just add more case
and the format thing and show_menu (1<<3) and so on
__________________