Already solved but, just to tell others: cs_get_user_team() returns a tagged value - such as CS_TEAM_T (see cstrike.inc for other values in the "class").
Code:
new CsTeams:iTeam = cs_get_user_team( iPlayer );
// iPlayer = index of a player
// iTeam is now.. lets say.. CS_TEAM_CT (2)
// this means you cannot check it like this:
if( iTeam == 2 )
{
// code
}
// you need to check it like this:
if( iTeam == CS_TEAM_CT )
{
// code
}
That is how you check it - unless you de-tag iTeam / cs_get_user_team like this:
Code:
if( _:cs_get_user_team( iPlayer ) == 2 )
{
// iPlayer is a CT
}
// or the other way around:
if( cs_get_user_team( iPlayer ) == CsTeams:2 ) // tagged 2 means CS_TEAM_CT
{
// iPlayer is a CT
}
__________________