Skip to content
Person8880 edited this page May 2, 2013 · 2 revisions

Overview

The player library provides functions for getting tables of players, or certain specific players.

Shine.GetAllClients

Shine.GetAllClients()

Returns an array of all currently connected server clients.

Shine.GetAllPlayers

Shine.GetAllPlayers()

Returns an array of all player entities (not server clients).

Shine.GetTeamClients

Shine.GetTeamClients( enum Team )

Returns an array of all server clients on the given team.

Shine.GetClientByID

Shine.GetClientByID( int ID )

Returns the server client with the given game ID (internal reference number, not the same as their server client ID) if one exists, otherwise nil.

Shine.GetClientByNS2ID

Shine.GetClientByNS2ID( int NS2ID )

Returns the server client with the given NS2 ID if one exists, otherwise nil.

Shine.GetClientBySteamID

Shine.GetClientBySteamID( string SteamID )

Returns the server client with the given Steam ID if one exists, otherwise nil.

Shine.GetClientByName

Shine.GetClientByName( string Name )

Returns the server client with the given name or a name that contains the given string if one exists, otherwise nil.

Shine:GetClient

Shine:GetClient( multiple ID )

Searches for a server client with a matching game ID, then NS2ID, then Steam ID and finally name. If one is matched from one of these filters, it will return the server client. If none match, it returns nil.

Shine:GetClientsByGroup

Shine:GetClientsByGroup( string GroupName )

Returns an array of all server clients in the given user group. Always returns a table, though it may be empty.

Shine:GetTeamName

Shine:GetTeamName( enum Team, boolean Capitals )

Returns a 'nice' string of the given team number's name. Capitals determines whether to use a capital letter at the start of the word.