# TASK::_SET_RANSACK_SCENARIO_CONTAINER_OPENING_STATE

- **Hash:** `0x188F8071F244B9B8`
- **Namespace:** TASK
- **Runtime name (Lua/JS):** `SetRansackScenarioContainerOpeningState`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **Other names:** `_SET_SCENARIO_CONTAINER_OPENING_STATE`
- **URL:** https://natives.borderlinerp.com/natives/TASK/_SET_RANSACK_SCENARIO_CONTAINER_OPENING_STATE

## Signature

```c
void _SET_RANSACK_SCENARIO_CONTAINER_OPENING_STATE(Entity entity, BOOL open);
```

## Parameters

- `entity` (`Entity`)
- `open` (`BOOL`)

## Returns

`void`

## Description

Opens/closes containers: ChestDugUp

## Usage

### Lua

```lua
SetRansackScenarioContainerOpeningState(entity, open)

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

### JavaScript

```js
SetRansackScenarioContainerOpeningState(entity, open);

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

### C#

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

- 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.

## See also

- [TASK::_GET_RANSACK_SCENARIO_CONTAINER_OPENING_STATE](https://natives.borderlinerp.com/natives/TASK/_GET_RANSACK_SCENARIO_CONTAINER_OPENING_STATE.md) — Returns m_eContainerState

*Sources: alloc8or RDR3 NativeDB.*
