# PED::_COMPUTE_LOOT_FOR_PED_CARCASS

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

## Signature

```c
int _COMPUTE_LOOT_FOR_PED_CARCASS(Any* outLoot, Hash model, int damageCleanliness, int skinningQuality);
```

## Parameters

- `outLoot` (`Any*`)
- `model` (`Hash`)
- `damageCleanliness` (`int`)
- `skinningQuality` (`int`)

## Returns

`int`

## Description

*Source: alloc8or RDR3 NativeDB*

Computes the loot table for an animal/human carcass given its model and processing quality.
Returns the number of loot entries written. Results are written into outLoot starting at index 1.
Usage/Example: https://pastebin.com/LffcaAXy

*Source: VORPCORE RDR3natives*

Used in Script Function SATCHEL_COUNT_BREAKDOWN_COMPONENTS

## Usage

### Lua

```lua
local retval, outLoot = ComputeLootForPedCarcass(model, damageCleanliness, skinningQuality)

-- always available, by hash
local retval, outLoot = Citizen.InvokeNative(0xB29C553BA582D09E, Citizen.PointerValueInt(), model, damageCleanliness, skinningQuality, Citizen.ResultAsInteger())
```

### JavaScript

```js
const [retval, outLoot] = ComputeLootForPedCarcass(model, damageCleanliness, skinningQuality);

// by hash
const [retval, outLoot] = Citizen.invokeNative('0xB29C553BA582D09E', Citizen.pointerValueInt(), model, damageCleanliness, skinningQuality, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
var outLoot = new OutputArgument();
int retval = Function.Call<int>((Hash)0xB29C553BA582D09E, outLoot, model, damageCleanliness, skinningQuality);
// outLoot.GetResult<int>()
```

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