ScriptClient

getNumberOfThreadsRunningTheScriptWithThisHash

GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH0x2C83A9DA6BFFC4F9

The GTA V native GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH of the SCRIPT namespace, as LS:MP client scripts call it: the global function getNumberOfThreadsRunningTheScriptWithThisHash, in JavaScript and in Lua.

SignatureJavaScript
getNumberOfThreadsRunningTheScriptWithThisHash(scriptHash: Hash): number
SignatureLua
getNumberOfThreadsRunningTheScriptWithThisHash(scriptHash: Hash): integer

Usage

JavaScript
const result = getNumberOfThreadsRunningTheScriptWithThisHash(scriptHash);
Lua
local result = getNumberOfThreadsRunningTheScriptWithThisHash(scriptHash)

Parameters

ParameterTypeJavaScriptLua
scriptHashHashnumberinteger

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Gets the number of instances of the specified script is currently running.

Reference

Namespace
Script SCRIPT
In the game
int GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(Hash scriptHash)
Hash
0x2C83A9DA6BFFC4F9
Formerly
_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT _GET_NUMBER_OF_INSTANCES_OF_SCRIPT_WITH_NAME_HASH _GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH

Open in the interactive natives reference