Raised This Month: $ Target: $400
 0% 

callback to the selected menu item


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EclipseCP
BANNED
Join Date: Dec 2010
Old 04-09-2011 , 02:03   callback to the selected menu item
Reply With Quote #1

hi, sorry for my bad english

a question, how do I make it look all gray (disabled) using callback, an option to select from a menu (again)

PHP Code:
show_menu_admin(id)
{
    new 
menu[128], menuid
    
    
// Title
    
formatex(menucharsmax(menu), "Menu admin" 
    
menuid menu_create(menu"menu_admin")
    
    
formatex(menucharsmax(menu), "test 1")
    
menu_additem(menuidmenu"1")
    
    
formatex(menucharsmax(menu), "test2")
    
menu_additem(menuidmenu"2")
    
    
formatex(menucharsmax(menu), "test3")
    
menu_additem(menuidmenu"3")
    
    
formatex(menucharsmax(menu), "%L"id"BACK")
    
menu_setprop(menuidMPROP_EXITNAMEmenu)
    
    
menu_display(idmenuid)
}

public 
menu_admin(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_chat"hello1")
        case 
2client_print(idprint_chat"hello2")
        case 
3client_print(idprint_chat"hello3")
    }
    
    
menu_destroy(menuid)
    
    return 
PLUGIN_HANDLED;

grettings!!
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 20:07.


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