Hello, i wanted to make a custom menu for admin on my server so they only see where they have the acces for but i have 2 things i cant get work and ask therefore for some help here.
The thing i have already is this
Code:
#include <amxmodx>
#include <cstrike>
#define Keysadmin_menu (1<<0)|(1<<1)|(1<<9)
public plugin_init() {
register_plugin("Admin Menu","1.0","sharpe")
register_clcmd( "adminmenu","Showadmin_menu", ADMIN_LEVEL_A, "Open menu")
register_menucmd(register_menuid("admin_menu"), Keysadmin_menu, "Pressedadmin_menu")
}
public Showadmin_menu(id) {
show_menu(id, Keysadmin_menu, "\yAdmin Menu^n^n\w1. action1^n2. action2^n3. action3^n^n0. Exit^n", -1, "admin_menu")
}
public Pressedadmin_menu(id, key) {
switch (key) {
case 0: client_cmd(id,"amx_banmenu")
case 1: client_cmd(id,"amx_recordmenu")
}
return PLUGIN_HANDLED
}
The 2 problems i have is that every player can open the menu even if they dont have the admin_level_a acces and in the console i getthe message
unknown command: adminmenu althought the menu is just working. Have anyone an idea how to fix both problems?
__________________