RedM Natives

SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT

Sets the loot table an entity will carry.

Hash0x8C03CD6B5E0E85E8
Runtime nameScriptOverrideEntityLootTablePermanent
NamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207

Signature

BOOL SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT(Entity entity, Hash lootTable);

Parameters

NameTypeDescription
entityEntity—
lootTableHash—

Returns BOOL

Description

Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object.
https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua

Usage

Lua
local retval = ScriptOverrideEntityLootTablePermanent(entity, lootTable)

-- always works, by hash
local retval = Citizen.InvokeNative(0x8C03CD6B5E0E85E8, entity, lootTable, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = ScriptOverrideEntityLootTablePermanent(entity, lootTable);

// by hash
const retval = Citizen.invokeNative('0x8C03CD6B5E0E85E8', entity, lootTable, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x8C03CD6B5E0E85E8, entity, lootTable);
  • 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`.

Sources

alloc8or RDR3 NativeDB

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