From ZDoom Wiki
Jump to navigation Jump to search
SkulltagIcon.png Warning: This feature is Skulltag specific, and is not compatible with ZDoom!
To see all of Skulltag's specific features, see Skulltag features.

int PlayerTeam (void)


Returns the team of the player who activated the function. Returns the same value as GetPlayerInfo(PlayerNumber(), PLAYERINFO_TEAM).

Return value

The current team of the player. No team is 255 always. Without use of the TEAMINFO lump the teams are: 0 for blue, 1 for red, 2 for green, 3 for gold, 4 for black, 5 for white, 6 for orange or 7 for purple.
For the first two, there are definitions in Skulltag's zdefs.acs (TEAM_BLUE and TEAM_RED).


 1 Script 1 ENTER
 2 {
 3     if (PlayerTeam() == TEAM_BLUE)
 4         Print(s:"You're on the blue team!");
 5     if (PlayerTeam() == TEAM_RED)
 6         Print(s:"You're on the red team!");
 7     if (PlayerTeam() == 2)
 8         Print(s:"You're on the green team!");
 9     if (PlayerTeam() == 3)
10         Print(s:"You're on the yellow team!");
11 }