GetPlayerCount

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
GetPlayerCount

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Gets the count of the online players. On the client it only returns the number of streamed in players.

Syntax

GetPlayerCount()

Parameters

  • This function has no parameters.

Return Value

  • Count of players.

Example

AddCommand("players", function(playerid)
	AddPlayerChat(playerid, "Players online: "..GetPlayerCount())
end)

See also