GetNumberOfPlayers

From Nomad DB

Get the number of players in the current play session.

Syntax

GetNumberOfPlayers()
  • Returns (number): Player Count

Example

local playerCount = GetNumberOfPlayers()
for i = 0, playerCount - 1 do
    local playerEntityId = GetEntityIdFromPlayerIndex(i)
    -- do stuff
end

Related Pages