_IS_BACKGROUND_SCRIPT
Returns true if the thread threadId is running a background script.
Signature
BOOL _IS_BACKGROUND_SCRIPT(int threadId); // 0x20B7F69B40C6B755 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | threadId | int |
Facts
| 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.
local result = Citizen.InvokeNative(0x20B7F69B40C6B755, -- _IS_BACKGROUND_SCRIPT
0 -- int threadId
)
if result then
-- ...
endconst result = Citizen.invokeNative("0x20B7F69B40C6B755", // _IS_BACKGROUND_SCRIPT
0, // int threadId
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x20B7F69B40C6B755, // _IS_BACKGROUND_SCRIPT
0 // int threadId
);Related SCRIPT natives
- _IS_ANY_PLAYER_BIT_SET
- _IS_GOAL_CONTEXT_ACTIVE
- _IS_PLAYER_BIT_SET_AT_INDEX
- _IS_THREAD_EXIT_REQUESTED_FOR_THREAD_WITH_THIS_ID
- _BG_RELOAD_ALL_BACKGROUND_SCRIPTS
- _TRIGGER_SCRIPT_EVENT_2
- BG_GET_SCRIPT_ID_FROM_NAME_HASH
- BG_IS_EXITFLAG_SET
- DOES_SCRIPT_EXIST
- DOES_SCRIPT_WITH_NAME_HASH_EXIST
- GET_HASH_OF_THIS_SCRIPT_NAME
- GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.