Raised This Month: $ Target: $400
 0% 

[HELP] menu_item_getinfo before selection.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 11-18-2015 , 13:55   Re: [HELP] menu_item_getinfo before selection.
Reply With Quote #1

I would probably go with something like this (untested):
PHP Code:
new const MENU_OPTIONS[][] =
{
    
"Option 69",
    
"Option 420",
    
"Option 1337",
    
"So many options, wow"
};

// Set everything to -1 so there's no gray option by default. Is this the desired behaviour?
new g_ItemID[33] = {-1, ...};

displayMenu(id)
{
    new 
menu menu_create("Best menu ever""AwesomeMenuHandler");
    new 
buffer[64];
    
    for(new 
0sizeof(MENU_OPTIONS); i++)
    {
        
formatex(buffercharsmax(buffer), "\%c%s", (g_ItemID == 'd' 'w'), MENU_OPTIONS[i]);
        
menu_additem(menubuffer);
    }
    
    
menu_display(idmenu);

klippy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-18-2015 , 20:49   Re: [HELP] menu_item_getinfo before selection.
Reply With Quote #2

Since you are using "newmenus.inc", this should be done using a callback.
__________________
fysiks 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 18:14.


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