From ZDoom Wiki
Jump to: navigation, 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).


Script 1 ENTER
    if (PlayerTeam() == TEAM_BLUE)
        Print(s:"You're on the blue team!");
    if (PlayerTeam() == TEAM_RED)
        Print(s:"You're on the red team!");
    if (PlayerTeam() == 2)
        Print(s:"You're on the green team!");
    if (PlayerTeam() == 3)
        Print(s:"You're on the yellow team!");