Raised This Month: $ Target: $400
 0% 

double switch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-25-2009 , 11:09   Re: double switch
Reply With Quote #2

Why use a switch when only checking for a single value of 0?

PHP Code:
public func_touch(idother)
{
    if(
get_pcvar_num(p_enable) && is_on_team[id] == is_on_team[other]) 
    {
        
entity_set_int(idEV_INT_solidSOLID_NOT
        
entity_set_int(otherEV_INT_solidSOLID_NOT)
    
        if ( !
task_is_running[id] ) 
        { 
            
set_task(0.2"btn"id
            
task_is_running[id] = 
        
}
        
        if ( !
task_is_running[other] ) 
        { 
            
set_task(0.2"btn"other
            
task_is_running[other] = 
        

    }

__________________
Bugsy is offline
 



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 01:30.


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