Raised This Month: $ Target: $400
 0% 

Menu with different options if conditions are met


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 02-09-2017 , 10:53   Re: Menu with different options if conditions are met
Reply With Quote #5

you can create a menu item callback and return ITEM_DISABLED there when needed

Code:
//menu function new pCallback = menu_makecallback("handle_callback") menu_additem(menu, "name", "info", 0, pCallback) //callback function public handle_callback(id, menu, item) {    new iAccess, szInfo[32], szName[32], callback    menu_item_getinfo(menu, item, iAccess, szInfo, charsmax(szInfo), szName, charsmax(szName), callback)        new iOption = str_to_num(szInfo)    if (iOption != whatever_value) //check if player can use this item       return ITEM_DISABLED }

Last edited by jimaway; 02-09-2017 at 11:01.
jimaway 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:42.


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