Raised This Month: $ Target: $400
 0% 

menu open


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gr33tz
Member
Join Date: Apr 2008
Old 07-22-2008 , 05:19   menu open
Reply With Quote #1

hi i make code

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Plugin"
#define VERSION "0.1"
#define AUTHOR "Author"
new mTitlemenu // Menu
new mcbTitlemenu // Menu Callback



public plugin_init() {
    /* Menu Title menu */
    /* Use menu_display(id, mTitlemenu, 0) to show the menu to an user. */
    mTitlemenu = menu_create("Title menu", "mh_Titlemenu")
    mcbTitlemenu = menu_makecallback("mcb_Titlemenu")
    menu_additem(mTitlemenu, "Item 1", "ma_Titlemenu", ADMIN_ALL, mcbTitlemenu)
    menu_additem(mTitlemenu, "Item 2", "ma_Titlemenu", ADMIN_ALL, mcbTitlemenu)
    menu_additem(mTitlemenu, "Item 3", "ma_Titlemenu", ADMIN_ALL, mcbTitlemenu)
    menu_additem(mTitlemenu, "Item 4", "ma_Titlemenu", ADMIN_ALL, mcbTitlemenu)
    menu_additem(mTitlemenu, "Item 5", "ma_Titlemenu", ADMIN_ALL, mcbTitlemenu)
    /* Menu End */

    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    // Add your code here...
}



/* Menu Title menu */

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

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

public mcb_Titlemenu(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 */
}
how to call open the menu?

I tried
Code:
register_clcmd("command", "mTitlemenu")
Code:
register_clcmd("command", "mh_Titlemenu")
but, dont work, I want to do this so that when you open the menu were the 5 options
Gr33tz is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 07-22-2008 , 05:48   Re: menu open
Reply With Quote #2

menu_display(id, menu, 0);
hzqst is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-22-2008 , 15:11   Re: menu open
Reply With Quote #3

Code:
public plugin_init() {     register_clclmd("say /my_menu_cmd", "CmdShowMenu", -1, ""); } public CmdShowMenu(id) {     menu_display(id, mTitleMenu, 0);         return PLUGIN_CONTINUE; }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
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:35.


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