Raised This Month: $ Target: $400
 0% 

A problem with menu.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
obiwan
Junior Member
Join Date: Sep 2008
Old 06-16-2010 , 13:56   Re: A problem with menu.
Reply With Quote #1

Quote:
Originally Posted by fysiks View Post
PHP Code:
if( get_cvar_num("mp_friendlyfire") ) 
I don't understand why you are using a callback. Do you want the line in the menu disabled? Also, ON and OFF are have no meaning.
I dont know how to check players value and then make it to change cvar from 0 to 1 and from 1 to 0 if he press a button 1 in menu

I just want to make something like this and i dont know how :


and after click

Last edited by obiwan; 06-16-2010 at 14:01.
obiwan is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-16-2010 , 15:18   Re: A problem with menu.
Reply With Quote #2

Quote:
Originally Posted by obiwan View Post
I dont know how to check players value and then make it to change cvar from 0 to 1 and from 1 to 0 if he press a button 1 in menu
PHP Code:
public Menu(id)
{
    
// ...
    
new szTemp[32]
    
formatex(szTempcharsmax(szTemp), "mp_friendlyfire %d"get_cvar_num("mp_friendlyfire"))
    
menu_additem(menuszTemp"1"ADMIN_IMMUNITY)
    
// ...
}
// menu handler
{
    
// ...
        
case 1:
        {
            
set_cvar_num("mp_friendlyfire"get_cvar_num("mp_friendlyfire") ? 1)
        }
    
// ...
    
menu_destroy(menu)
    
Menu(id)

__________________
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 14:46.


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