I've tried in the switch and this way. I can't make it work :(
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("test", "1.00", "Werewolf")
register_clcmd("say menu", "test")
register_clcmd("say_team menu", "test")
register_clcmd("say /menu", "test")
register_clcmd("say_team /menu", "test")
register_menucmd(register_menuid("test"),1023,"testkeys")
}
public test(id)
{
new menu[1024]
format(menu, 1023, "Select power^n^n1. Godmode!^n2. Noclip!^n^n0. Exit")
new key = MENU_KEY_0|MENU_KEY_1
show_menu(id, key, menu)
return PLUGIN_CONTINUE
}
public testkeys(id, key)
{
if(key == 0)
{
if(!(get_user_flags(id)&ADMIN_IMMUNITY))
{
client_print(id, print_chat, "You do not have access to that power.")
return PLUGIN_HANDLED
}
set_user_godmode(id)
return PLUGIN_CONTINUE
}
if(key == 1)
{
if(!(get_user_flags(id)&ADMIN_IMMUNITY))
{
client_print(id, print_chat, "You do not have access to that power.")
return PLUGIN_HANDLED
}
set_user_noclip(id)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}