Raised This Month: $12 Target: $400
 3% 

[Help] structure of get_user_team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ingmar13
Member
Join Date: Jun 2008
Old 02-16-2013 , 07:50   [Help] structure of get_user_team
Reply With Quote #1

Dear reader,

I need to get more information on how pawn works with certain structures as get_user_team(id)
i know the 1,2,3,4 part
1 = terror,
2 = ct
3 = spectator
4 = unassigned

how to make a public methode that let you continue in a part of code with for example if you are CT or T only.

Feel free to ask me more information.
__________________
will make maps for food!
ingmar13 is offline
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 02-16-2013 , 07:58   Re: [Help] structure of get_user_team
Reply With Quote #2

Code:
if( 1 <= get_user_team( id ) <= 2 ) {     // T or CT  }

or,

Code:
if( CS_TEAM_T <= cs_get_user_team( id ) <= CS_TEAM_CT ) {     // T or CT  }

Last edited by guipatinador; 02-16-2013 at 07:59.
guipatinador is offline
benio101
Junior Member
Join Date: Feb 2012
Location: Toruń, Poland
Old 02-16-2013 , 10:33   Re: [Help] structure of get_user_team
Reply With Quote #3

unassigned is 0, no 4, and you get CT or TT only by
PHP Code:
if(get_user_team(id)%3
benio101 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-16-2013 , 11:07   Re: [Help] structure of get_user_team
Reply With Quote #4

Always use cs_get_user_team() in Counter-Strike. See cstrike.inc to see the values that it returns.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 20:37.


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