# MISC::_IS_BIT_FLAG_SET

- **Hash:** `0x8F4F050054005C27`
- **Namespace:** MISC
- **Runtime name (Lua/JS):** `IsBitFlagSet`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/MISC/_IS_BIT_FLAG_SET

## Signature

```c
BOOL _IS_BIT_FLAG_SET(Any* bitFlags, int flag);
```

## Parameters

- `bitFlags` (`Any*`)
- `flag` (`int`)

## Returns

`BOOL`

## Usage

### Lua

```lua
local retval, bitFlags = IsBitFlagSet(flag)

-- always available, by hash
local retval, bitFlags = Citizen.InvokeNative(0x8F4F050054005C27, Citizen.PointerValueInt(), flag, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, bitFlags] = IsBitFlagSet(flag);

// by hash
const [retval, bitFlags] = Citizen.invokeNative('0x8F4F050054005C27', Citizen.pointerValueInt(), flag, Citizen.returnResultAnyway());
```

### C#

```csharp
var bitFlags = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x8F4F050054005C27, bitFlags, flag);
// bitFlags.GetResult<int>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.
- The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works.

*Sources: alloc8or RDR3 NativeDB.*
