Raised This Month: $ Target: $400
 0% 

Command Toggle(ON/OFF)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-14-2014 , 10:22   Re: Command Toggle(ON/OFF)
Reply With Quote #1

Ahh I hate this:
PHP Code:
public clcmdReady(id)
{    
    if(
g_user_ready[id])
    {
        
g_user_ready[id] = false
    
} else {
        
g_user_ready[id] = true
    
}

It's just:
PHP Code:
public clcmdReady(id)
{    
    
g_user_ready[id] = !g_user_ready[id]

__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 07-14-2014 , 10:52   Re: Command Toggle(ON/OFF)
Reply With Quote #2

If/Else condition in this case for further coding. For example, adding client_print() messages, like:
Quote:
"%s" Ready.
"%s" Not Ready.
Phant is offline
Send a message via ICQ to Phant
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 21:05.


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