C# Класс GarrysModLuaShared.team

The team library gives you access to the team system built into the Source engine, and allows you to create custom teams and get information about them.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddScore ( LuaState luaState, uint teamIndex, uint increment ) : void

Increases the score of the given team.

BestAutoJoinTeam ( LuaState luaState ) : uint

Returns the team index of the team with the least players. Falls back to TEAM.TEAM_UNASSIGNED.

GetName ( LuaState luaState, uint teamIndex ) : string

Returns the name of the team.

GetScore ( LuaState luaState, uint teamIndex ) : int

Returns the score of the team.

Joinable ( LuaState luaState, uint teamIndex ) : bool

Returns if a team is joinable or not. This is set in SetUp.

NumPlayers ( LuaState luaState, uint teamIndex ) : uint

Returns the amount of players in a team.

SetClass ( LuaState luaState, uint teamIndex, object classId ) : void

Sets valid classes for use by a team. Classes can be created using player_manager.RegisterClass .

SetScore ( LuaState luaState, uint teamIndex, int score ) : void

Sets the score of the given team.

SetSpawnPoint ( LuaState luaState, uint teamIndex, object classes ) : void

Sets valid spawnpoint classes for use by a team.

TotalDeaths ( LuaState luaState, uint teamIndex ) : uint

Returns the sum of deaths of all players of the team.

TotalFrags ( LuaState luaState, uint teamIndex ) : uint

Returns the sum of frags of all players of the team.

Valid ( LuaState luaState, uint teamIndex ) : bool

Returns true if the given team index is valid.

Описание методов

AddScore() публичный статический Метод

Increases the score of the given team.
public static AddScore ( LuaState luaState, uint teamIndex, uint increment ) : void
luaState LuaState Pointer to lua_State struct.
teamIndex uint Index of the team.
increment uint Amount to increase the team's score by.
Результат void

BestAutoJoinTeam() публичный статический Метод

Returns the team index of the team with the least players. Falls back to TEAM.TEAM_UNASSIGNED.
public static BestAutoJoinTeam ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
Результат uint

GetName() публичный статический Метод

Returns the name of the team.
public static GetName ( LuaState luaState, uint teamIndex ) : string
luaState LuaState Pointer to lua_State struct.
teamIndex uint The team index.
Результат string

GetScore() публичный статический Метод

Returns the score of the team.
public static GetScore ( LuaState luaState, uint teamIndex ) : int
luaState LuaState Pointer to lua_State struct.
teamIndex uint The team index.
Результат int

Joinable() публичный статический Метод

Returns if a team is joinable or not. This is set in SetUp.
public static Joinable ( LuaState luaState, uint teamIndex ) : bool
luaState LuaState Pointer to lua_State struct.
teamIndex uint The index of the team.
Результат bool

NumPlayers() публичный статический Метод

Returns the amount of players in a team.
public static NumPlayers ( LuaState luaState, uint teamIndex ) : uint
luaState LuaState Pointer to lua_State struct.
teamIndex uint The team index.
Результат uint

SetClass() публичный статический Метод

Sets valid classes for use by a team. Classes can be created using player_manager.RegisterClass .
public static SetClass ( LuaState luaState, uint teamIndex, object classId ) : void
luaState LuaState Pointer to lua_State struct.
teamIndex uint Index of the team.
classId object A class ID or table of class IDs.
Результат void

SetScore() публичный статический Метод

Sets the score of the given team.
public static SetScore ( LuaState luaState, uint teamIndex, int score ) : void
luaState LuaState Pointer to lua_State struct.
teamIndex uint Index of the team.
score int The team's new score.
Результат void

SetSpawnPoint() публичный статический Метод

Sets valid spawnpoint classes for use by a team.
public static SetSpawnPoint ( LuaState luaState, uint teamIndex, object classes ) : void
luaState LuaState Pointer to lua_State struct.
teamIndex uint Index of the team.
classes object A spawnpoint classname or table of spawnpoint classnames.
Результат void

TotalDeaths() публичный статический Метод

Returns the sum of deaths of all players of the team.
public static TotalDeaths ( LuaState luaState, uint teamIndex ) : uint
luaState LuaState Pointer to lua_State struct.
teamIndex uint The team index.
Результат uint

TotalFrags() публичный статический Метод

Returns the sum of frags of all players of the team.
public static TotalFrags ( LuaState luaState, uint teamIndex ) : uint
luaState LuaState Pointer to lua_State struct.
teamIndex uint The team index.
Результат uint

Valid() публичный статический Метод

Returns true if the given team index is valid.
public static Valid ( LuaState luaState, uint teamIndex ) : bool
luaState LuaState Pointer to lua_State struct.
teamIndex uint Index of the team.
Результат bool