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
}