AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] structure of get_user_team (https://forums.alliedmods.net/showthread.php?t=208663)

ingmar13 02-16-2013 07:50

[Help] structure of get_user_team
 
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.

guipatinador 02-16-2013 07:58

Re: [Help] structure of get_user_team
 
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  }

benio101 02-16-2013 10:33

Re: [Help] structure of get_user_team
 
unassigned is 0, no 4, and you get CT or TT only by
PHP Code:

if(get_user_team(id)%3


fysiks 02-16-2013 11:07

Re: [Help] structure of get_user_team
 
Always use cs_get_user_team() in Counter-Strike. See cstrike.inc to see the values that it returns.


All times are GMT -4. The time now is 00:53.

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