# PED::GET_CARRIED_ATTACHED_INFO_FOR_SLOT

- **Hash:** `0x608BC6A6AACD5036`
- **Namespace:** PED
- **Runtime name (Lua/JS):** `GetCarriedAttachedInfoForSlot`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described with examples
- **Since game build:** 1207
- **Other names:** `_GET_CARRIED_ATTACHED_INFO_FOR_SLOT`
- **URL:** https://natives.borderlinerp.com/natives/PED/GET_CARRIED_ATTACHED_INFO_FOR_SLOT

## Signature

```c
BOOL GET_CARRIED_ATTACHED_INFO_FOR_SLOT(Any* outData, Ped ped, int carriableSlot, int p3);
```

## Parameters

- `outData` (`Any*`)
- `ped` (`Ped`)
- `carriableSlot` (`int`)
- `p3` (`int`)

## Returns

`BOOL`

## Description

*Source: alloc8or RDR3 NativeDB*

Outputs carriable info for a ped's carriable slot (see TASK_CARRIABLE slot indices). p3 is always 0 in R* scripts. Returns true if outData was filled.

outData: script struct<4> (32 bytes); each field is 8-byte (alignas(8)):
	struct CarriedAttachedInfo
	{
		alignas(8) Hash   model;         // carried entity model
		alignas(8) Hash   carryConfig;   // carry config (e.g. DEAD_CARRIABLE_FOX)
		alignas(8) int    carriableSlot; // slot index queried
		alignas(8) Entity entity;        // carried entity handle (0 if none)
	};

Example image: https://imgur.com/a/2wjt6PT

*Source: VORPCORE RDR3natives*

Outputs carriable infos for selected ped carriable slot.

Parameters:
- outData: Any* — A structure of 4 explained below
- ped: Ped to check
- carriableSlot: int See TASK_CARRIABLE for available slots
- p3: int always 0 in R* scripts

## Usage

### Lua

```lua
local retval, outData = GetCarriedAttachedInfoForSlot(ped, carriableSlot, p3)

-- always available, by hash
local retval, outData = Citizen.InvokeNative(0x608BC6A6AACD5036, Citizen.PointerValueInt(), ped, carriableSlot, p3, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, outData] = GetCarriedAttachedInfoForSlot(ped, carriableSlot, p3);

// by hash
const [retval, outData] = Citizen.invokeNative('0x608BC6A6AACD5036', Citizen.pointerValueInt(), ped, carriableSlot, p3, Citizen.returnResultAnyway());
```

### C#

```csharp
var outData = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x608BC6A6AACD5036, outData, ped, carriableSlot, p3);
// outData.GetResult<int>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
- `Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below.

## Examples

*Source: VORPCORE RDR3natives*

```lua
struct outData
{
  Hash model;
  Hash carryConfig;
  Hash carriableSlot;
  Entity entityCarried;
}
```

*Sources: alloc8or RDR3 NativeDB, VORPCORE RDR3natives.*
