ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getPlayerCount

Function

getPlayerCount

ServerPlayersIdentical to MTA:SA

Returns the number of players on the server.

Syntax

int getPlayerCount()

Returns

Player count.

Example

addEventHandler("onPlayerJoin", root, function()
    outputChatBox("Graczy online: " .. getPlayerCount())
end)

See also