GetPlayerCount

From Onset Developer Wiki
Revision as of 22:57, 17 December 2019 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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