Raised This Month: $ Target: $400
 0% 

new style menu. Access problem!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Niro
Member
Join Date: Oct 2004
Location: Russia,St-Petersburg
Old 10-27-2007 , 13:40   new style menu. Access problem!
Reply With Quote #1

Please help.

If i have access mo (ADMIN_LEVEL_A and ADMIN_LEVEL_C) i cant use menuitem ADMIN_LEVEL_C

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "niro"
new mTESTACCESSMENU // Menu
new mcbTESTACCESSMENU // Menu Callback



public plugin_init() {
/* Menu TEST ACCESS MENU */
/* Use menu_display(id, mTESTACCESSMENU, 0) to show the menu to an user. */
mTESTACCESSMENU = menu_create("TEST ACCESS MENU", "mh_TESTACCESSMENU")
mcbTESTACCESSMENU = menu_makecallback("mcb_TESTACCESSMENU")
menu_additem(mTESTACCESSMENU, "ADMIN_LEVEL_A", "ma_TESTACCESSMENU", ADMIN_LEVEL_A, mcbTESTACCESSMENU)
menu_additem(mTESTACCESSMENU, "ADMIN_LEVEL_B", "ma_TESTACCESSMENU", ADMIN_LEVEL_B, mcbTESTACCESSMENU)
menu_additem(mTESTACCESSMENU, "ADMIN_LEVEL_C", "ma_TESTACCESSMENU", ADMIN_LEVEL_C, mcbTESTACCESSMENU)
/* Menu End */

register_plugin(PLUGIN, VERSION, AUTHOR)

register_concmd("testmenu","mymenu",ADMIN_LEV EL_A," - show menu")
}


/* Menu TEST ACCESS MENU */

public mh_TESTACCESSMENU(id, menu, item) {
/* This event is called when someone presses a key on this menu */
}

public ma_TESTACCESSMENU(id) {
/* This event is called when an item was selected */
}

public mcb_TESTACCESSMENU(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 */
}

public mymenu(id){
menu_display(id, mTESTACCESSMENU, 0)
}
Attached Thumbnails
Click image for larger version

Name:	b.JPG
Views:	105
Size:	3.2 KB
ID:	21105   Click image for larger version

Name:	a.JPG
Views:	129
Size:	3.7 KB
ID:	21107  
__________________
At you one chance to create the correct future
Niro is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 10-27-2007 , 15:11   Re: new style menu. Access problem!
Reply With Quote #2

File a bug report if you haven't already.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Reply



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 05:26.


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