Raised This Month: $ Target: $400
 0% 

[solved]how to make a disabled option in old style menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Owyn
Veteran Member
Join Date: Nov 2007
Old 08-21-2009 , 13:24   [solved]how to make a disabled option in old style menu
Reply With Quote #1

hi, i'm trying to make a menu which shows players, players with immunity should be as disabled grey option, but i can't figure out how to make that, i tried not specifing keys for immune player but that doesn't make menu item gray plus it makes wrong menu item disabled (1 should be disabled, but it disables 2nd item, 1st is still clickable) (all still in white color anyway) =\ here's the code
PHP Code:
public ShowPlayerMenu(id)
{
  new 
arrayloc 0
  
new keys = (1<<9)

  
arrayloc format(ga_MenuData,(MAX_menudata-1),"voteban menu ^n")
  for(
i=0i<8i++)
   if( 
gi_TotalPlayers>(gi_MenuPosition+i) )
   {
    if(
immunity[gi_MenuPosition+i]) //has immunity
    
{
        
arrayloc += format(ga_MenuData[arrayloc],(MAX_menudata-1-arrayloc),"%d. %s^n"i+1ga_PlayerName[gi_MenuPosition+i])
        
keys |= (1<<i)
    }
    else
    {    
        
arrayloc += format(ga_MenuData[arrayloc],(MAX_menudata-1-arrayloc),"%d. %s^n"i+1ga_PlayerName[gi_MenuPosition+i])
        
keys |= (1<<i)
    }
        
    
   }
  if( 
gi_TotalPlayers>(gi_MenuPosition+8) )
  {
    
arrayloc += format(ga_MenuData[arrayloc],(MAX_menudata-1-arrayloc),"^n9. Еще")
    
keys |= (1<<8)
  }
  
arrayloc += format(ga_MenuData[arrayloc],(MAX_menudata-1-arrayloc),"^n0. Назад/Выход")

  
show_menu(idkeysga_MenuData20"ChoosePlayer")
  return 
PLUGIN_HANDLED 

__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 08-21-2009 at 13:31.
Owyn is offline
Send a message via ICQ to Owyn
 



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 15:16.


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