Raised This Month: $ Target: $400
 0% 

My Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
umarsa
Senior Member
Join Date: Feb 2006
Location: U.K
Old 03-31-2006 , 18:32   My Mod
Reply With Quote #1

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)
umarsa is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 03-31-2006 , 19:25  
Reply With Quote #2

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.
Brad is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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