GetPlayerCount
Jump to navigation
Jump to search
getPlayerCount
Returns the current number of connected players.
Syntax
int getPlayerCount()
Parameters
This function does not accept parameters.
Returns
Returns the number of connected players as an integer.
Examples
Announce the online count:
outputChatBox("Players online: " .. getPlayerCount())
Notes
- Available only in server-side resource scripts.