# ENTITY::_GET_ENTITY_BY_DOORHASH

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

## Signature

```c
Entity _GET_ENTITY_BY_DOORHASH(Hash doorHash, int p1);
```

## Parameters

- `doorHash` (`Hash`)
- `p1` (`int`)

## Returns

`Entity`

## Description

*Source: alloc8or RDR3 NativeDB*

Params: p1 = 0 in R* Scripts (GET_DOOR_ENTITY_FROM_ID)
https://github.com/femga/rdr3_discoveries/blob/master/doorHashes/doorhashes.lua

*Source: femga rdr3_discoveries*

```
// 0xF7424890E4A094C0
 _GET_ENTITY_FROM_DOORHASH(doorhash,0)
    -------------------------------------------------------------------
```

## Usage

### Lua

```lua
local retval = GetEntityByDoorhash(doorHash, p1)

-- always available, by hash
local retval = Citizen.InvokeNative(0xF7424890E4A094C0, doorHash, p1, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetEntityByDoorhash(doorHash, p1);

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

### C#

```csharp
int retval = Function.Call<int>((Hash)0xF7424890E4A094C0, doorHash, p1);
```

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

*Sources: alloc8or RDR3 NativeDB, femga rdr3_discoveries.*
