# OBJECT::DOOR_SYSTEM_SET_DOOR_STATE

- **Hash:** `0x6BAB9442830C7F53`
- **Namespace:** OBJECT
- **Runtime name (Lua/JS):** `DoorSystemSetDoorState`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/OBJECT/DOOR_SYSTEM_SET_DOOR_STATE

## Signature

```c
void DOOR_SYSTEM_SET_DOOR_STATE(Hash doorHash, int state);
```

## Parameters

- `doorHash` (`Hash`)
- `state` (`int`)

## Returns

`void`

## Description

Door lock states:
enum eDoorState
{
	DOORSTATE_INVALID = -1,
	DOORSTATE_UNLOCKED,
	DOORSTATE_LOCKED_UNBREAKABLE,
	DOORSTATE_LOCKED_BREAKABLE,
	DOORSTATE_HOLD_OPEN_POSITIVE,
	DOORSTATE_HOLD_OPEN_NEGATIVE
};

## Usage

### Lua

```lua
DoorSystemSetDoorState(doorHash, state)

-- always available, by hash
Citizen.InvokeNative(0x6BAB9442830C7F53, doorHash, state)
```

### JavaScript

```js
DoorSystemSetDoorState(doorHash, state);

// by hash
Citizen.invokeNative('0x6BAB9442830C7F53', doorHash, state);
```

### C#

```csharp
Function.Call((Hash)0x6BAB9442830C7F53, doorHash, state);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.

## Related enums

- [DoorScriptState](https://natives.borderlinerp.com/enums/DoorScriptState.md) — 5 values

*Sources: alloc8or RDR3 NativeDB.*
