Raised This Month: $ Target: $400
 0% 

What's wrong


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Redfalcon
BANNED
Join Date: Sep 2009
Location: Prison Break
Old 10-24-2009 , 18:07   What's wrong
Reply With Quote #1

What's wrong with this code?
PHP Code:
register_clcmd("say /xp""XpMenu");
 public 
XpMenu(id) {
 new 
menu menu_create("\Xpmod menu""xpmenu_handler");
 
menu_additem(menu"\Info""7"0);
 
menu_setprop(menuMPROP_EXITMEXIT_ALL);
        
menu_display(idmenu0);
 public 
xpmenu_handler(idmenuitem) { 

Last edited by Redfalcon; 10-24-2009 at 18:14.
Redfalcon is offline
Send a message via MSN to Redfalcon
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 10-24-2009 , 18:10   Re: What's wrong
Reply With Quote #2

Post in php codes
PHP Code:
public XpMenu(id)
{
   new 
menu menu_create("\Xpmod menu""xpmenu_handler");
   
menu_additem(menu"\Info""7"0);
   
menu_setprop(menuMPROP_EXITMEXIT_ALL);
   
menu_display(idmenu0);

You forgot to close the function
__________________
alan_el_more is offline
Old 10-24-2009, 18:12
Redfalcon
This message has been deleted by Redfalcon.
Redfalcon
BANNED
Join Date: Sep 2009
Location: Prison Break
Old 10-24-2009 , 18:18   Re: What's wrong
Reply With Quote #4

PHP Code:
public plugin_init() {
register_clcmd("say /xp""XpMenu");
}
public 
XpMenu(id) {
    new 
menu menu_create("\Xpmod menu""xpmenu_handler");
    
menu_additem(menu"\Info""7"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}
public 
xpmenu_handler(idmenuitem) {
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];

     new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
7:
        {
            
client_print(idprint_chat"You pressed for info  ")
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

The menu doesn't show up.
I skipped registering and includes.

Last edited by Redfalcon; 10-24-2009 at 18:27.
Redfalcon is offline
Send a message via MSN to Redfalcon
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 17:39.


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