# SCRIPT::BG_IS_EXITFLAG_SET

- **Hash:** `0x2238EC3EC631AB1F`
- **Namespace:** SCRIPT
- **Runtime name (Lua/JS):** `BgIsExitflagSet`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **Note:** not used by the game's own scripts
- **URL:** https://natives.borderlinerp.com/natives/SCRIPT/BG_IS_EXITFLAG_SET

## Signature

```c
BOOL BG_IS_EXITFLAG_SET();
```

## Returns

`BOOL`

## Description

Returns true if GtaThread+0x77C is equal to 1.

Old name: _BG_EXITED_BECAUSE_BACKGROUND_THREAD_STOPPED

## Usage

### Lua

```lua
local retval = BgIsExitflagSet()

-- always available, by hash
local retval = Citizen.InvokeNative(0x2238EC3EC631AB1F, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = BgIsExitflagSet();

// by hash
const retval = Citizen.invokeNative('0x2238EC3EC631AB1F', Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x2238EC3EC631AB1F);
```

*Sources: alloc8or RDR3 NativeDB.*
