The Lab
SCRIPT native

GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH

returns int1 parambuild 1207

Returns how many threads are currently running the script whose name hash is scriptHash.

Check it before starting a script to avoid launching duplicates.

Signature

C
int GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(Hash scriptHash); // 0x8E34C953364A76DD b1207

Parameters

#NameType
1scriptHashHash

Facts

Facts about GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
Name
GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
Hash
0x8E34C953364A76DD
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(0x8E34C953364A76DD, -- GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
  GetHashKey("name"), -- Hash scriptHash
  Citizen.ResultAsInteger()
)
print(result)
JavaScript
const result = Citizen.invokeNative("0x8E34C953364A76DD", // GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
  GetHashKey("name"), // Hash scriptHash
  Citizen.resultAsInteger()
);
console.log(result)
C#
int result = Function.Call<int>((Hash)0x8E34C953364A76DD, // GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
  (uint)API.GetHashKey("name") // Hash scriptHash
);
All SCRIPT natives

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