Raised This Month: $ Target: $400
 0% 

not open my menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EclipseCP
BANNED
Join Date: Dec 2010
Old 05-14-2011 , 09:50   not open my menu
Reply With Quote #1

hello, sorry for my english, use translator..

i have a problem, not open my menu.

code:

PHP Code:

#define MAX_MODES 5

new const LANG_MODES[MAX_MODES][] =
{
    
"Dog",
    
"Cat",
    
"Parrot",
    
"Crab",
    
"etc"
}

public 
my_menu(id)
{
    new 
menu[128], number[8], menuidi
    
    formatex
(menucharsmax(menu), "\yTest")
    
    
menuid menu_create(menu"my_menu_handle"

    for (
0MAX_MODESi++)
    {    
        
formatex(menucharsmax(menu), "%s"LANG_MODES[i])
        
        
num_to_str(inumcharsmax(num))
        
        
menu_additem(menuidmenunum)
    }
    
    
// No exit
    
menu_setprop(menuidMPROP_EXITMEXIT_NEVER)
    
    
menu_display(idmenuid


public 
my_menu_handle(idmenuiditem)
{
    
// Menu was closed
    
if (item == MENU_EXIT)
    {
        
menu_destroy(menuid)
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
buffer[4], dummyitemid
    menu_item_getinfo
(menuiditemdummybuffercharsmax(buffer), __dummy)
    
    
itemid str_to_num(buffer)
    
    switch(
itemid)
    {
        case 
1client_print(idprint_center"Hello")
    }
    
    
menu_destroy(menuid)
    
    return 
PLUGIN_HANDLED;

EclipseCP is offline
 



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 04:24.


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