ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. countPlayersInTeam

Function

countPlayersInTeam

ServerPlayersIdentical to MTA:SA

Returns the number of players in a team.

Syntax

int countPlayersInTeam(team theTeam)

Arguments

theTeamteam
The team.

Returns

Player count or false.

Example

for _, team in ipairs(getElementsByType("team")) do
    outputChatBox(getTeamName(team) .. ": " .. countPlayersInTeam(team) .. " graczy")
end

See also