SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT
Sets the loot table an entity will carry.
Hash
0x8C03CD6B5E0E85E8Runtime name
ScriptOverrideEntityLootTablePermanentNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
Signature
BOOL SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT(Entity entity, Hash lootTable);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
lootTable | Hash | — |
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
local retval = ScriptOverrideEntityLootTablePermanent(entity, lootTable)
-- always works, by hash
local retval = Citizen.InvokeNative(0x8C03CD6B5E0E85E8, entity, lootTable, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = ScriptOverrideEntityLootTablePermanent(entity, lootTable);
// by hash
const retval = Citizen.invokeNative('0x8C03CD6B5E0E85E8', entity, lootTable, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0x8C03CD6B5E0E85E8, entity, lootTable);- 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`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.