So I'm trying to make an admin menu and I want to start of with the once I think is hard, slay/slap and mute/gag, when they are done I can do the switching on transfer and such myself
Mute = Voice_chat
Gag = Text_Chat
If you dont understand tell me to explain better and I'll do my very best, thanks in advance!
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "AdminMenu"
#define VERSION "1.0"
#define AUTHOR "CAKE"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("/ftam", "ShowMenu", ADMIN_BAN, "Admin menu");
}
public ShowMenu(id, lvl, cid)
{
if(!cmd_access(id, lvl, cid, 0))
return PLUGIN_HANDLED;
new menu = menu_create(`"\r[FT] \wAdmin-Menu^n\yMain Menu", "MainMenu_Handler");
menu_additem(menu, "\wSlay\y/\wSlap", "", 0);
menu_additem(menu, "\wKick", "", 0);
menu_additem(menu, "\wTransfer", "", 0);
menu_additem(menu, "\wMute\y/\wGag", "", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public MainMenu_Handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id);
return PLUGIN_HANDLED;
}
new command[6], name[64], access, callback;
menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
switch(item)
{
case 0:
{
// Should lead to another menu
// Number one menuitem should be able to switch between slay and slap
// Number 2, 3, 4 etc should be players including yourself
}
case 1:
{
}
case 2:
{
client_print(id, print_chat, "You have selected Transfer");
}
case 3:
{
// Should lead to another menu
// Number one menuitem should be able to switch between mute and gag
// Number 2, 3, 4 etc should be players
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}