# ENTITY::SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT

- **Hash:** `0x8C03CD6B5E0E85E8`
- **Namespace:** ENTITY
- **Runtime name (Lua/JS):** `ScriptOverrideEntityLootTablePermanent`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/ENTITY/SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT

## Signature

```c
BOOL SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT(Entity entity, Hash lootTable);
```

## Parameters

- `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

### Lua

```lua
local retval = ScriptOverrideEntityLootTablePermanent(entity, lootTable)

-- always available, by hash
local retval = Citizen.InvokeNative(0x8C03CD6B5E0E85E8, entity, lootTable, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = ScriptOverrideEntityLootTablePermanent(entity, lootTable);

// by hash
const retval = Citizen.invokeNative('0x8C03CD6B5E0E85E8', entity, lootTable, Citizen.returnResultAnyway());
```

### C#

```csharp
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.*
