{"hash":"0xB29C553BA582D09E","ns":"PED","name":"_COMPUTE_LOOT_FOR_PED_CARCASS","slug":"_COMPUTE_LOOT_FOR_PED_CARCASS","official":false,"named":true,"luaName":"ComputeLootForPedCarcass","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"outLoot","type":"Any*"},{"name":"model","type":"Hash"},{"name":"damageCleanliness","type":"int"},{"name":"skinningQuality","type":"int"}],"summary":"Computes the loot table for an animal/human carcass given its model and processing quality.","descriptions":[{"source":"alloc8or","format":"text","body":"Computes the loot table for an animal/human carcass given its model and processing quality.\nReturns the number of loot entries written. Results are written into outLoot starting at index 1.\nUsage/Example: https://pastebin.com/LffcaAXy"},{"source":"vorp","format":"text","body":"Used in Script Function SATCHEL_COUNT_BREAKDOWN_COMPONENTS"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":2,"url":"https://natives.borderlinerp.com/natives/PED/_COMPUTE_LOOT_FOR_PED_CARCASS","markdownUrl":"https://natives.borderlinerp.com/natives/PED/_COMPUTE_LOOT_FOR_PED_CARCASS.md","snippets":{"lua":"local retval, outLoot = ComputeLootForPedCarcass(model, damageCleanliness, skinningQuality)","luaInvoke":"local retval, outLoot = Citizen.InvokeNative(0xB29C553BA582D09E, Citizen.PointerValueInt(), model, damageCleanliness, skinningQuality, Citizen.ResultAsInteger())","js":"const [retval, outLoot] = ComputeLootForPedCarcass(model, damageCleanliness, skinningQuality);","jsInvoke":"const [retval, outLoot] = Citizen.invokeNative('0xB29C553BA582D09E', Citizen.pointerValueInt(), model, damageCleanliness, skinningQuality, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"var outLoot = new OutputArgument();\nint retval = Function.Call<int>((Hash)0xB29C553BA582D09E, outLoot, model, damageCleanliness, skinningQuality);\n// outLoot.GetResult<int>()","notes":["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."]}}