RedM Natives

_COMPUTE_LOOT_FOR_PED_CARCASS

Computes the loot table for an animal/human carcass given its model and processing quality.

Hash0xB29C553BA582D09E
Runtime nameComputeLootForPedCarcass
NamespacePED
SideClient
NameCommunity guess
Docs
Since build1207

Signature

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

Parameters

NameTypeDescription
outLootAny*—
modelHash—
damageCleanlinessint—
skinningQualityint—

Returns int

Description

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

VORPCORE RDR3natives

Used in Script Function SATCHEL_COUNT_BREAKDOWN_COMPONENTS

Usage

Lua
local retval, outLoot = ComputeLootForPedCarcass(model, damageCleanliness, skinningQuality)

-- always works, by hash
local retval, outLoot = Citizen.InvokeNative(0xB29C553BA582D09E, Citizen.PointerValueInt(), model, damageCleanliness, skinningQuality, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
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#
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

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.