# CFX::ENSURE_ENTITY_STATE_BAG

- **Hash:** `0x3BB78F05`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `EnsureEntityStateBag`
- **Side:** shared (Cfx runtime native)
- **Name status:** official
- **Documentation:** described
- **URL:** https://natives.borderlinerp.com/natives/CFX/ENSURE_ENTITY_STATE_BAG

## Signature

```c
void ENSURE_ENTITY_STATE_BAG(Entity entity);
```

## Parameters

- `entity` (`Entity`)

## Returns

`void`

## Description

*Source: Cfx.re native reference*

Internal function for ensuring an entity has a state bag.

## Usage

### Lua

```lua
EnsureEntityStateBag(entity)

-- always available, by hash
Citizen.InvokeNative(0x3bb78f05, entity)
```

### JavaScript

```js
EnsureEntityStateBag(entity);

// by hash
Citizen.invokeNative('0x3bb78f05', entity);
```

### C#

```csharp
Function.Call((Hash)0x3bb78f05, entity);
```

*Sources: Cfx.re native reference.*
