# PED::_GET_PED_INDEX_FROM_PERSCHAR_HASH

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

## Signature

```c
Ped _GET_PED_INDEX_FROM_PERSCHAR_HASH(Hash persCharHash, int p1);
```

## Parameters

- `persCharHash` (`Hash`)
- `p1` (`int`)

## Returns

`Ped`

## Description

*Source: alloc8or RDR3 NativeDB*

Used for AUDIO / ANIMSCENE (REFERENCE_REGIONAL_CHARACTER)
Params: p1 = 0

*Source: VORPCORE RDR3natives*

Used for AUDIO / ANIMSCENE (REFERENCE_REGIONAL_CHARACTER)
Params: p1 = 0
_GET_PED_IN*

## Usage

### Lua

```lua
local retval = GetPedIndexFromPerscharHash(persCharHash, p1)

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

### JavaScript

```js
const retval = GetPedIndexFromPerscharHash(persCharHash, p1);

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

### C#

```csharp
int retval = Function.Call<int>((Hash)0xE76687023D8C8505, persCharHash, 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, VORPCORE RDR3natives.*
