Thread: Multijump
View Single Post
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-17-2010 , 18:00   Re: Multijump
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
I don't think he's showing how to check team in code but was using the OR operator instead of typing "or"... Atleast I hope so.
I doubt he was using proper coding for that.
He was most likely coding for logic:
If the player's team is Terrorist, Counter-Terrorist, or Spectator
Code:
if( cs_get_user_team( iPlayer ) == CS_TEAM_T || CS_TEAM_CT || CS_TEAM_SPECTATOR )
3 ways to fix this with the if() statement, and he wasn't close to any.
1.
Code:
if( cs_get_user_team( iPlayer ) == CS_TEAM_T || cs_get_user_team( iPlayer ) == CS_TEAM_CT || cs_get_user_team( iPlayer ) == CS_TEAM_SPECTATOR )
2.
Code:
new CsTeams:iTeam = cs_get_user_team( iPlayer );
if( iTeam == CS_TEAM_T || iTeam == CS_TEAM_CT || iTeam == CS_TEAM_SPECTATOR )
3.
Code:
if( ( 1 << ( _:cs_get_user_team( iPlayer ) ) ) & ( ( 1 << ( _:CS_TEAM_T ) ) | ( 1 << ( _:CS_TEAM_CT ) ) | ( 1 << ( _:CS_TEAM_SPECTATOR ) ) ) )
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline