Player Manager¶
Player
is a global which allows you to retrieve Player instances and Player colors.
Function Summary¶
Function Name | Return | Description | |
---|---|---|---|
getAvailableColors()getAvailableColors() |
Returns a table of strings of every valid seat color at the current table. Returned colors are in the default order. | ||
getColors()getColors() |
Returns a table of strings of every possible seat color. Returned colors are in the default order. | ||
getPlayers() | Returns a table of all Player instances. | ||
getSpectators() | Returns a table of all spectator (Grey) Player instances. |
Actions¶
The onPlayerAction event allows you to handle player actions. A list of player actions
is available as Player.Action
.
Example
Log all available player actions:
log(Player.Action)
For more details about these actions, please refer to the documentation for onPlayerAction.
Function Details¶
getPlayers()¶
Returns a table of all Player instances.
Example
Blindfold all players.
for _, player in ipairs(Player.getPlayers()) do
player.blindfolded = true
end
getSpectators()¶
Returns a table of all spectator (Grey) Player instances.
Example
Print the steam name of all spectators.
for _, spectator in ipairs(Player.getSpectators()) do
print(spectator.steam_name)
end