Raised This Month: $ Target: $400
 0% 

Is there a better way to check if players are on same team?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-26-2009 , 13:36   Is there a better way to check if players are on same team?
Reply With Quote #1

Is there a better way than this to check if 2 players are on same team?

PHP Code:
stock bool:is_both_on_same_team(indexindex2) {
    if (
cs_get_user_team(index) == CS_TEAM_T && cs_get_user_team(index2) == CS_TEAM_T)
        return 
true;
    
    else if (
cs_get_user_team(index) == CS_TEAM_CT && cs_get_user_team(index2) == CS_TEAM_CT)
        return 
true;
    
    return 
false;

Thanks
-zacky
zacky is offline
Send a message via Skype™ to zacky
 



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:33.


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