Hi All as this is under help i would like to ask this.
I Made this :
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN ".."
#define VERSION "1.0"
#define AUTHOR ".."
new mAdminMenu // Menu
new mcbAdminMenu // Menu Callback
public plugin_init() {
/* Menu Admin Menu */
/* Use menu_display(id, mAdminMenu, 0) to show the menu to an user. */
mAdminMenu = menu_create("Admin Menu", "mh_AdminMenu")
mcbAdminMenu = menu_makecallback("mcb_AdminMenu")
menu_additem(mAdminMenu, "Server Restart (20)", "ma_AdminMenu", ADMIN_IMMUNITY, mcbAdminMenu)
menu_additem(mAdminMenu, "Server Shutdown (20)", "ma_AdminMenu", ADMIN_IMMUNITY, mcbAdminMenu)
/* Menu End */
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd( "amx_admin", "menu_display", 0, "Opens Admin Menu" )
}
/* Menu Admin Menu */
public mh_AdminMenu(id, menu, item) {
/* This event is called when someone presses a key on this menu */
}
public ma_AdminMenu(id) {
/* This event is called when an item was selected */
}
public mcb_AdminMenu(id, menu, item) {
/* This is the callback-event, here you can set items enabled or disabled. */
/* If you want to enable an item, use: return ITEM_ENABLED */
/* If you want to disable an item, use: return ITEM_DISABLED */
}
it compiles propley and everything and i got amx_restart/amx_shutdown installed and can sum1 tweak this to work so "amx_admin" is this menu? and post it here :S
commads ;
preset : amx_restart (how ever many secs)
amx_shut down (how ever many secs)
now do i chage this :
Code:
menu_additem(mAdminMenu, "Server Restart (20)", "ma_AdminMenu", ADMIN_IMMUNITY, mcbAdminMenu)
menu_additem(mAdminMenu, "Server Shutdown (20)", "ma_AdminMenu", ADMIN_IMMUNITY, mcbAdminMenu)