The Lab
NETWORK native

NETWORK_GET_NUM_CONNECTED_PLAYERS

returns int0 paramsbuild 1207

Returns the number of players connected to the session.

Signature

C
int NETWORK_GET_NUM_CONNECTED_PLAYERS(); // 0xA4A79DD2D9600654 b1207

Parameters

This native takes no parameters.

Facts

Facts about NETWORK_GET_NUM_CONNECTED_PLAYERS
Name
NETWORK_GET_NUM_CONNECTED_PLAYERS
Hash
0xA4A79DD2D9600654
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0xA4A79DD2D9600654, -- NETWORK_GET_NUM_CONNECTED_PLAYERS
  Citizen.ResultAsInteger()
)
print(result)
JavaScript
const result = Citizen.invokeNative("0xA4A79DD2D9600654", // NETWORK_GET_NUM_CONNECTED_PLAYERS
  Citizen.resultAsInteger()
);
console.log(result)
C#
int result = Function.Call<int>((Hash)0xA4A79DD2D9600654); // NETWORK_GET_NUM_CONNECTED_PLAYERS
All NETWORK natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.