# OBJECT::_SET_DOOR_KNOCKING_WHEN_LOCKED

- **Hash:** `0xA93F925F1942E434`
- **Namespace:** OBJECT
- **Runtime name (Lua/JS):** `SetDoorKnockingWhenLocked`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/OBJECT/_SET_DOOR_KNOCKING_WHEN_LOCKED

## Signature

```c
void _SET_DOOR_KNOCKING_WHEN_LOCKED(Hash doorHash, BOOL toggle);
```

## Parameters

- `doorHash` (`Hash`)
- `toggle` (`BOOL`)

## Returns

`void`

## Description

*Source: alloc8or RDR3 NativeDB*

Changes the interaction behavior for a locked door.
When enabled, interacting with a locked door makes the character knock/tap instead of trying the handle.
This does not unlock or open the door and only changes the locked-door interaction behavior/animation.

*Source: VORPCORE RDR3natives*

Changes the interaction behavior for a locked door.
Normally, when interacting with a locked door, the character tries the handle. When this native is enabled, that behavior is replaced with a knocking/tapping interaction for the specified door.
With toggle enabled:
- pressing the interact button on a locked door makes the character knock/tap on the door instead of trying the handle
- this does not unlock the door
- if the door is in a breakable/force-open state, it may still be opened by physically forcing it (e.g. sprinting into it), but normal interaction still uses the knocking behavior

## Usage

### Lua

```lua
SetDoorKnockingWhenLocked(doorHash, toggle)

-- always available, by hash
Citizen.InvokeNative(0xA93F925F1942E434, doorHash, toggle)
```

### JavaScript

```js
SetDoorKnockingWhenLocked(doorHash, toggle);

// by hash
Citizen.invokeNative('0xA93F925F1942E434', doorHash, toggle);
```

### C#

```csharp
Function.Call((Hash)0xA93F925F1942E434, doorHash, toggle);
```

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

- [OBJECT::_GET_DOOR_KNOCKING_WHEN_LOCKED](https://natives.borderlinerp.com/natives/OBJECT/_GET_DOOR_KNOCKING_WHEN_LOCKED.md) — Returns whether the specified door has the locked-door knocking interaction enabled.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
