# ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX

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

## Signature

```c
Ped GET_PED_INDEX_FROM_ENTITY_INDEX(Entity entity);
```

## Parameters

- `entity` (`Entity`)

## Returns

`Ped`

## Description

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).

## Usage

### Lua

```lua
local retval = GetPedIndexFromEntityIndex(entity)

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

### JavaScript

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

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

### C#

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

*Sources: alloc8or RDR3 NativeDB.*
