# DECORATOR::_DECOR_GET_PLAYER_INDEX

- **Hash:** `0xB1682B2443F0540B`
- **Namespace:** DECORATOR
- **Runtime name (Lua/JS):** `DecorGetPlayerIndex`
- **Side:** client (game native)
- **Name status:** community guess (may change)
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/DECORATOR/_DECOR_GET_PLAYER_INDEX

## Signature

```c
int _DECOR_GET_PLAYER_INDEX(Entity entity, const char* propertyName);
```

## Parameters

- `entity` (`Entity`)
- `propertyName` (`const char*`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = DecorGetPlayerIndex(entity, propertyName)

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

### JavaScript

```js
const retval = DecorGetPlayerIndex(entity, propertyName);

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

### C#

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

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