# ENTITY::_GET_OPTIMAL_CARRY_CONFIG

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

## Signature

```c
Hash _GET_OPTIMAL_CARRY_CONFIG(Entity entity, int index);
```

## Parameters

- `entity` (`Entity`)
- `index` (`int`)

## Returns

`Hash`

## Description

Valid indices: 0 - 3
Index 1 always returns a `hogtied` config, doesn't matter the entity.
It's for humans only and the ped must be resurrected first if it's dead.

## Usage

### Lua

```lua
local retval = GetOptimalCarryConfig(entity, index)

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

### JavaScript

```js
const retval = GetOptimalCarryConfig(entity, index);

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

### C#

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

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