GetPlayerCount: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Automatyczna aktualizacja dokumentacji funkcji
 
Complete Lua function catalog
 
Line 23: Line 23:
* Available only in server-side resource scripts.
* Available only in server-side resource scripts.


[[Category:Lua Functions]]
[[Category:Server Functions]]
[[Category:Server Functions]]
[[Category:Player Functions]]
[[Category:Player Functions]]

Latest revision as of 09:52, 15 August 2026

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.