# PLAYER::GET_PLAYER_PED_SCRIPT_INDEX

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

## Signature

```c
Ped GET_PLAYER_PED_SCRIPT_INDEX(Player player);
```

## Parameters

- `player` (`Player`)

## Returns

`Ped`

## Description

Does the same like PLAYER::GET_PLAYER_PED

## Usage

### Lua

```lua
local retval = GetPlayerPedScriptIndex(player)

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

### JavaScript

```js
const retval = GetPlayerPedScriptIndex(player);

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

### C#

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

*Sources: alloc8or RDR3 NativeDB.*
