Raised This Month: $ Target: $400
 0% 

What's wrong


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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