# GetTeamByIndex

Teams
5.1 OC
int
int index Index into the list of teams.
Returns the indicated team number. This function guarantees that for values from 0 to GetTeamCount()-1 a valid team number will be returned (notice that there may be "gaps" between team numbers in case some team have been removed from the game). This makes it easier to process all teams in a loop.
for
(var i = 0; i < GetTeamCount(); i++) Log("Welcome in the game, players from team %s", GetTeamName(GetTeamByIndex(i)));
Welcomes all players in the log file.
Teams
GetTeamColor
GetTeamName
GetPlayerTeam
GetTeamCount
Clonkonaut
2008-04