AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   My Mod (https://forums.alliedmods.net/showthread.php?t=26352)

umarsa 03-31-2006 18:32

My Mod
 
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)


Brad 03-31-2006 19:25

Did you bother reading the forum descriptions as opposed to just the forum names?

As an aside, when you post Pawn code it's much more readable if you put it in the [small] tags.

Moved from "Support/Help" forum.


All times are GMT -4. The time now is 16:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.