NetworkClient

networkGetNumScriptParticipants

NETWORK_GET_NUM_SCRIPT_PARTICIPANTS0x3658E8CD94FC121A

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

SignatureJavaScript
networkGetNumScriptParticipants(
  scriptName: string,
  instance_id: number,
  position_hash: number
): number
SignatureLua
networkGetNumScriptParticipants(
  scriptName: string,
  instance_id: integer,
  position_hash: integer
): integer

Usage

JavaScript
const result = networkGetNumScriptParticipants(scriptName, instance_id, position_hash);
Lua
local result = networkGetNumScriptParticipants(scriptName, instance_id, position_hash)

Parameters

ParameterTypeJavaScriptLua
scriptNamestringstringstring
instance_idintnumberinteger
position_hashintnumberinteger

Returns

int JavaScript number, Lua integer

Reference

Namespace
Network NETWORK
In the game
int NETWORK_GET_NUM_SCRIPT_PARTICIPANTS(const char* scriptName, int instance_id, int position_hash)
Hash
0x3658E8CD94FC121A

Open in the interactive natives reference