_COMPUTE_LOOT_FOR_PED_CARCASS
Computes the loot table for an animal/human carcass given its model and processing quality.
Hash
0xB29C553BA582D09ERuntime name
ComputeLootForPedCarcassNamespacePED
SideClient
NameCommunity guess
Docs
Since build1207
Signature
int _COMPUTE_LOOT_FOR_PED_CARCASS(Any* outLoot, Hash model, int damageCleanliness, int skinningQuality);Parameters
| Name | Type | Description |
|---|---|---|
outLoot | Any* | — |
model | Hash | — |
damageCleanliness | int | — |
skinningQuality | int | — |
Returns int
Description
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
Used in Script Function SATCHEL_COUNT_BREAKDOWN_COMPONENTS
Usage
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#
const [retval, outLoot] = ComputeLootForPedCarcass(model, damageCleanliness, skinningQuality);
// by hash
const [retval, outLoot] = Citizen.invokeNative('0xB29C553BA582D09E', Citizen.pointerValueInt(), model, damageCleanliness, skinningQuality, Citizen.returnResultAnyway(), Citizen.resultAsInteger());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.InvokeNativeneeds the number — passjoaat("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
InvokeNativewith the hash — it always works.
Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.