{"hash":"0x8E34C953364A76DD","ns":"SCRIPT","name":"GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH","slug":"GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH","official":true,"named":true,"luaName":"GetNumberOfThreadsRunningTheScriptWithThisHash","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"scriptHash","type":"Hash"}],"summary":"Gets the number of instances of the specified script is currently running.","descriptions":[{"source":"alloc8or","format":"text","body":"Gets the number of instances of the specified script is currently running.\n\nActually returns numRefs - 1.\nif (program)\n\tv3 = rage::scrProgram::GetNumRefs(program) - 1;\nreturn v3;\n\nOld name: _GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0x2C83A9DA6BFFC4F9","gtaJhash":"0x029D3841","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/SCRIPT/GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH","markdownUrl":"https://natives.borderlinerp.com/natives/SCRIPT/GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH.md","snippets":{"lua":"local retval = GetNumberOfThreadsRunningTheScriptWithThisHash(scriptHash)","luaInvoke":"local retval = Citizen.InvokeNative(0x8E34C953364A76DD, scriptHash, Citizen.ResultAsInteger())","js":"const retval = GetNumberOfThreadsRunningTheScriptWithThisHash(scriptHash);","jsInvoke":"const retval = Citizen.invokeNative('0x8E34C953364A76DD', scriptHash, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x8E34C953364A76DD, scriptHash);","notes":["Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat(\"name\")` or a backtick literal like `` `name` ``."]}}