# SCRIPT::_IS_PLAYER_BIT_SET_AT_INDEX

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

## Signature

```c
BOOL _IS_PLAYER_BIT_SET_AT_INDEX(Any* value, int bitIndex);
```

## Parameters

- `value` (`Any*`)
- `bitIndex` (`int`)

## Returns

`BOOL`

## Usage

### Lua

```lua
local retval, value = IsPlayerBitSetAtIndex(bitIndex)

-- always available, by hash
local retval, value = Citizen.InvokeNative(0x72B2E00C9BAC6789, Citizen.PointerValueInt(), bitIndex, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, value] = IsPlayerBitSetAtIndex(bitIndex);

// by hash
const [retval, value] = Citizen.invokeNative('0x72B2E00C9BAC6789', Citizen.pointerValueInt(), bitIndex, Citizen.returnResultAnyway());
```

### C#

```csharp
var value = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x72B2E00C9BAC6789, value, bitIndex);
// value.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.*
