NetworkClient

networkGetTotalNumPlayers

NETWORK_GET_TOTAL_NUM_PLAYERS0xCF61D4B4702EE9EB

The GTA V native NETWORK_GET_TOTAL_NUM_PLAYERS of the NETWORK namespace, as LS:MP client scripts call it: the global function networkGetTotalNumPlayers, in JavaScript and in Lua.

SignatureJavaScript
networkGetTotalNumPlayers(): number
SignatureLua
networkGetTotalNumPlayers(): integer

Usage

JavaScript
const result = networkGetTotalNumPlayers();
Lua
local result = networkGetTotalNumPlayers()

Parameters

None.

Returns

int JavaScript number, Lua integer

Reference

Namespace
Network NETWORK
In the game
int NETWORK_GET_TOTAL_NUM_PLAYERS()
Hash
0xCF61D4B4702EE9EB

Open in the interactive natives reference