Nuclide
Software Development Kit for id Technology (BETA)
teamAPI_t Struct Reference

Public Member Functions

int BestAutoJoinTeam (void)
 
int TeamCount (void)
 
int OpenTeamCount (void)
 
vector Color (int)
 
string Name (int)
 
int Score (int)
 
string SpawnPoint (int)
 
int NumPlayers (int)
 
int NumAlivePlayers (int)
 
int NumDeadPlayers (int)
 
int TotalDeaths (int)
 
int TotalFrags (int)
 
float Valid (int)
 
void AddScore (int, int)
 
void SetScore (int, int)
 
entity RandomPlayer (int)
 
void SetUp (int teamID, string teamTitle, vector teamColor, float openTeam)
 Sets up a team for the current session. More...
 
void AddClass (int teamID, string classType)
 Sets up a team class for the current session. More...
 
int TotalClasses (int teamID)
 Returns the maximum number of classes this team can select. More...
 
string ClassForIndex (int teamID, int classIndex)
 Returns the class type of a given team + index. More...
 
void SetSpawnPoint (int teamID, string spawnPointEntityClassname)
 Sets up a team spawn point for the current session. More...
 

Member Function Documentation

◆ AddClass()

void teamAPI_t::AddClass ( int  teamID,
string  classType 
)

Sets up a team class for the current session.

Making them available to choose in the team selection menu. You can have different classes per teams also.

Parameters
teamIDspecifies which team slot to occupy.
classTypespecifies the name of the player class. Used as an identifer in rules and menus.

◆ AddScore()

void teamAPI_t::AddScore ( int  ,
int   
)

◆ BestAutoJoinTeam()

int teamAPI_t::BestAutoJoinTeam ( void  )

◆ ClassForIndex()

string teamAPI_t::ClassForIndex ( int  teamID,
int  classIndex 
)

Returns the class type of a given team + index.

Parameters
teamIDspecifies which team slot to query for class types.
classIndexspecifies the index of the class to query. Use teams.TotalClasses() for the range.

◆ Color()

vector teamAPI_t::Color ( int  )

◆ Name()

string teamAPI_t::Name ( int  )

◆ NumAlivePlayers()

int teamAPI_t::NumAlivePlayers ( int  )

◆ NumDeadPlayers()

int teamAPI_t::NumDeadPlayers ( int  )

◆ NumPlayers()

int teamAPI_t::NumPlayers ( int  )

◆ OpenTeamCount()

int teamAPI_t::OpenTeamCount ( void  )

◆ RandomPlayer()

entity teamAPI_t::RandomPlayer ( int  )

◆ Score()

int teamAPI_t::Score ( int  )

◆ SetScore()

void teamAPI_t::SetScore ( int  ,
int   
)

◆ SetSpawnPoint()

void teamAPI_t::SetSpawnPoint ( int  teamID,
string  spawnPointEntityClassname 
)

Sets up a team spawn point for the current session.

Using this function you can override the default team spawn, such as info_player_deathmatch type entities - and reroute spawns for a specific team to a different class.

Parameters
teamIDspecifies which team slot to occupy.
spawnPointEntityClassnamespecifies the classname of this team's spawn point.

◆ SetUp()

void teamAPI_t::SetUp ( int  teamID,
string  teamTitle,
vector  teamColor,
float  openTeam 
)

Sets up a team for the current session.

Will flush the team specific scores.

Parameters
teamIDspecifies which team slot to occupy.
teamTitlespecifies the title of the team.
teamColorspecifies the color of the team (e.g. [0, 255, 0] for green).
openTeamspecifies whether players can join the team manually.

◆ SpawnPoint()

string teamAPI_t::SpawnPoint ( int  )

◆ TeamCount()

int teamAPI_t::TeamCount ( void  )

◆ TotalClasses()

int teamAPI_t::TotalClasses ( int  teamID)

Returns the maximum number of classes this team can select.

Parameters
teamIDspecifies which team slot to query for class types.

◆ TotalDeaths()

int teamAPI_t::TotalDeaths ( int  )

◆ TotalFrags()

int teamAPI_t::TotalFrags ( int  )

◆ Valid()

float teamAPI_t::Valid ( int  )

The documentation for this struct was generated from the following file: