Thread: bool ???
View Single Post
Strick3n
Member
Join Date: Apr 2013
Old 10-03-2014 , 16:40   Re: bool ???
Reply With Quote #6

You can use bool variable to do it.

here example:
PHP Code:
#include < amxmodx >

new bool:g_bDisabled33 ];

public 
menu_example() 
{
    
// menu code goes here.. 
    
    
new szItem64 ];
    
    
formatexszItemcharsmaxszItem ), "My Option [ %sabled ]"g_bDisabledid ] ? "Dis" "En" );
    
    
menu_additemmenuidszItem );
    
    
// crap ..
}

public 
sub_menuidmenuitem )
{
    if( 
item == /*item id*/ )
        
g_bDisabledid ] = !g_bDisabledid ];

__________________

Last edited by Strick3n; 10-03-2014 at 16:40.
Strick3n is offline