# OBJECT::_GET_DOOR_KNOCKING_WHEN_LOCKED

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

## Signature

```c
BOOL _GET_DOOR_KNOCKING_WHEN_LOCKED(Hash doorHash);
```

## Parameters

- `doorHash` (`Hash`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Returns whether the specified door has the locked-door knocking interaction enabled.
Getter counterpart of _SET_DOOR_KNOCKING_WHEN_LOCKED.

*Source: VORPCORE RDR3natives*

Checks whether the specified door has the "knocking when locked" interaction enabled

## Usage

### Lua

```lua
local retval = GetDoorKnockingWhenLocked(doorHash)

-- always available, by hash
local retval = Citizen.InvokeNative(0x4D8611DFE1126478, doorHash, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = GetDoorKnockingWhenLocked(doorHash);

// by hash
const retval = Citizen.invokeNative('0x4D8611DFE1126478', doorHash, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x4D8611DFE1126478, doorHash);
```

- 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::_SET_DOOR_KNOCKING_WHEN_LOCKED](https://natives.borderlinerp.com/natives/OBJECT/_SET_DOOR_KNOCKING_WHEN_LOCKED.md) — Changes the interaction behavior for a locked door.

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
