NetworkClient

networkIsScriptActive

NETWORK_IS_SCRIPT_ACTIVE0x9D40DF90FAD26098

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

SignatureJavaScript
networkIsScriptActive(
  scriptName: string,
  instance_id: number,
  p2: boolean,
  position_hash: number
): boolean
SignatureLua
networkIsScriptActive(
  scriptName: string,
  instance_id: integer,
  p2: boolean,
  position_hash: integer
): boolean

Usage

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

Parameters

ParameterTypeJavaScriptLua
scriptNamestringstringstring
instance_idintnumberinteger
p2BOOLbooleanboolean
position_hashintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Network NETWORK
In the game
BOOL NETWORK_IS_SCRIPT_ACTIVE(const char* scriptName, int instance_id, BOOL p2, int position_hash)
Hash
0x9D40DF90FAD26098

Open in the interactive natives reference