RedM Natives

GET_THREAD_EXISTENCE_DETAILS

Hash0xD92FA81B64920E85
Runtime nameGetThreadExistenceDetails
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207

Signature

void GET_THREAD_EXISTENCE_DETAILS(int threadId, BOOL* threadExists, BOOL* hasScriptHandler);

Parameters

NameTypeDescription
threadIdint—
threadExistsBOOL*—
hasScriptHandlerBOOL*—

Returns void

Usage

Lua
local threadExists, hasScriptHandler = GetThreadExistenceDetails(threadId)

-- always works, by hash
local threadExists, hasScriptHandler = Citizen.InvokeNative(0xD92FA81B64920E85, threadId, Citizen.PointerValueInt() --[[ BOOL* ]], Citizen.PointerValueInt() --[[ BOOL* ]])
JavaScript and C#
JavaScript
const [threadExists, hasScriptHandler] = GetThreadExistenceDetails(threadId);

// by hash
const [threadExists, hasScriptHandler] = Citizen.invokeNative('0xD92FA81B64920E85', threadId, Citizen.pointerValueInt() /* BOOL* */, Citizen.pointerValueInt() /* BOOL* */);
C#
var threadExists = new OutputArgument();
var hasScriptHandler = new OutputArgument();
Function.Call((Hash)0xD92FA81B64920E85, threadId, threadExists, hasScriptHandler);
// threadExists.GetResult<bool>()
// hasScriptHandler.GetResult<bool>()
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.