# Team Management

Before using team API, please create team management object. The methods as follows:

local Team = class.Team.new()

The specific function name and description are as follows:

Serial number Function name Description
1 getNumTeam(...) The number of current team
2 getTeamPlayerNum(...) Obtain the number of players in designate team
3 getTeamPlayers(...) Get the designate player team
4 randomTeamPlayer(...) Random Player
5 getTeamCreatures(...) Obtain creature in designate team(like getTeamPlayers)
6 setTeamScore(...) Score of team
7 getTeamScore(...) Get the team score
8 addTeamScore(...) Increase the team score
9 setTeamResults(...) Result of team
10 getTeamResults(...) Get the current win-los of team
11 setTeamPlayersResults(...) Set the win-los of player team
12 setTeamDieTimes(...) Number of team deaths
13 getTeamDieTimes(...) Get the total deaths of team
14 addTeamDieTimes(...) Increase the total deaths of team
15 changePlayerTeam(...) Change player's team

# getNumTeam

  • Parameters and types:nil
  • Return value and types:
  • The main role of this method: The number of current team
  • The specific use cases are as follows:
local result = Team:getNumTeam()

# getTeamPlayerNum

  • Parameters and types:
    • teamid:numberTeam ID, default all
    • alive:numberWhether survive, default all
  • Return value and types:
  • The main role of this method: Obtain the number of players in designate team
  • The specific use cases are as follows:
local result = Team:getTeamPlayerNum(teamid, alive)

# getTeamPlayers

  • Parameters and types:
    • teamid:numberTeam ID, default all
    • alive:numberWhether survive, default all
  • Return value and types:
  • The main role of this method: Get the designate player team
  • The specific use cases are as follows:
local result = Team:getTeamPlayers(teamid, alive)

# randomTeamPlayer

  • Parameters and types:
    • teamid:numberTeam ID, default all
    • alive:numberWhether survive, default all
  • Return value and types:
  • The main role of this method: Random Player
  • The specific use cases are as follows:
local result = Team:randomTeamPlayer(teamid, alive)

# getTeamCreatures

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Obtain creature in designate team(like getTeamPlayers)
  • The specific use cases are as follows:
local result = Team:getTeamCreatures(teamid)

# setTeamScore

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Score of team
  • The specific use cases are as follows:
local result = Team:setTeamScore(teamid, score)

# getTeamScore

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Get the team score
  • The specific use cases are as follows:
local result = Team:getTeamScore(teamid)

# addTeamScore

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Increase the team score
  • The specific use cases are as follows:
local result = Team:addTeamScore(teamid, score)

# setTeamResults

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Result of team
  • The specific use cases are as follows:
local result = Team:setTeamResults(teamid, result)

# getTeamResults

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Get the current win-los of team
  • The specific use cases are as follows:
local result = Team:getTeamResults(teamid)

# setTeamPlayersResults

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Set the win-los of player team
  • The specific use cases are as follows:
local result = Team:setTeamPlayersResults(teamid, result)

# setTeamDieTimes

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Number of team deaths
  • The specific use cases are as follows:
local result = Team:setTeamDieTimes(teamid, times)

# getTeamDieTimes

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Get the total deaths of team
  • The specific use cases are as follows:
local result = Team:getTeamDieTimes(teamid)

# addTeamDieTimes

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Increase the total deaths of team
  • The specific use cases are as follows:
local result = Team:addTeamDieTimes(teamid)

# changePlayerTeam

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Change player's team
  • The specific use cases are as follows:
local result = Team:changePlayerTeam(playerid, teamid)
Last Update: 11/22/2019, 2:31:59 PM