The Lab
SCRIPT native

_IS_BACKGROUND_SCRIPT

returns BOOL1 parambuild 1207

Returns true if the thread threadId is running a background script.

Signature

C
BOOL _IS_BACKGROUND_SCRIPT(int threadId); // 0x20B7F69B40C6B755 b1207

Parameters

#NameType
1threadIdint

Facts

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

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