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.
파일 보기 프로젝트 열기: OmegaExtern/gmod-csharp-binary-module

공개 메소드들

메소드 설명
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