The Lab
SCRIPT native

IS_THREAD_ACTIVE

returns BOOL2 paramsbuild 1207

Returns true if the thread threadId is active. ignoreKilledState controls whether threads that are being killed still count.

Signature

C
BOOL IS_THREAD_ACTIVE(int threadId, BOOL ignoreKilledState); // 0x46E9AE36D8FA6417 b1207

Parameters

#NameType
1threadIdint
2ignoreKilledStateBOOL

Facts

Facts about IS_THREAD_ACTIVE
Name
IS_THREAD_ACTIVE
Hash
0x46E9AE36D8FA6417
Namespace
Returns
BOOL
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(0x46E9AE36D8FA6417, -- IS_THREAD_ACTIVE
  0, -- int threadId
  false -- BOOL ignoreKilledState
)
if result then
  -- ...
end
JavaScript
const result = Citizen.invokeNative("0x46E9AE36D8FA6417", // IS_THREAD_ACTIVE
  0, // int threadId
  false, // BOOL ignoreKilledState
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
bool result = Function.Call<bool>((Hash)0x46E9AE36D8FA6417, // IS_THREAD_ACTIVE
  0, // int threadId
  false // BOOL ignoreKilledState
);
All SCRIPT natives

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