player.team

Type: Team

The team that this player belongs to.

This property can be assigned to, but only in Free-For-All games; this is how gametypes like Infection are able to split players into separate factions. Assigning to this property during Team games has no effect; if teams are enabled within the gametype, then you cannot forcibly change a player's team using scripts.

Example

for each player do
   if current_player.team == team[0] then
      --
      -- Player is on Team 1.
      --
   end
end

See also