# INTERIOR::GET_KEY_FOR_ENTITY_IN_ROOM

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

## Signature

```c
Hash GET_KEY_FOR_ENTITY_IN_ROOM(Entity entity);
```

## Parameters

- `entity` (`Entity`)

## Returns

`Hash`

## Description

Seems to do the exact same as INTERIOR::GET_ROOM_KEY_FROM_ENTITY

## Usage

### Lua

```lua
local retval = GetKeyForEntityInRoom(entity)

-- always available, by hash
local retval = Citizen.InvokeNative(0x27D7B6F79E1F4603, entity, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetKeyForEntityInRoom(entity);

// by hash
const retval = Citizen.invokeNative('0x27D7B6F79E1F4603', entity, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x27D7B6F79E1F4603, entity);
```

*Sources: alloc8or RDR3 NativeDB.*
