T3 // Underworld & Cyber

coe_loot

Loot Tables

Centralized robbery loot with configurable rolls and weights

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_logging
coe_loot 3 exports · 1 command

Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.

01 // OVERVIEW

Robbery loot tables. Robbery scripts (house, pedestrian, vehicle, store, heists) do not keep their own item lists: they call the Give export when done and the loot comes from here. Each table has a number of rolls, weighted entries, empty rolls and unique items, keeping balance in one place.

On FiveM Enhanced

Only authorized resources (Callers) can roll, and each item chance can be computed from the weights.

02 // FEATURES

What the module delivers

01

Central Balance

One place for all city loot.

02

Weights & Rolls

Rolls, weights, empties and quantities.

03

Unique Items

Non-stacking items enter one at a time.

04

Authorized Callers

Only allowed resources generate loot.

ARCHITECTURAL LAYERS // CLEAN ARCHITECTURE

4-Layer Isolation with 0.00 ms Idle

Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:

L4
Headless Operation (No UI)
Zero DOM · CoE UI Delegation
Headless
L3
Application & Server
Atomic locks · Rate limiting
Auth Server
L2
Platform & HAL
Core.Platform · Mock natives
Gen9 HAL
L1
Domain & ACID Database
Prepared SQL · MariaDB pool
ACID Pool
LAYER 04 // HEADLESS SERVICE

Headless Service (No Dedicated NUI)

Operates strictly within layers L1–L3 (domain, HAL, and server-authoritative application logic). Visual interactions and management flows are delegated to centralized ecosystem apps (coe_ui / coe_tablet), guaranteeing 0.00 ms idle client overhead in FiveM DX12.

Zero CEF graphic overhead: no background web pages or NUI bridges loaded
Typed public contracts (types.lua) consumed directly by external resources and UIs
Strict adherence to the Server-Authoritative model with zero direct DOM manipulation
ADMIN POWERS // OPERATION & MANAGEMENT

What this script delivers to Server Owners

Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:

🛡️
ACE Permissions
Administrative operations strictly protected by coe.staff and coe.admin principals.
IsPlayerAceAllowed(src, "coe.admin")
📊
Ledger Auditing
Relevant actions write audit records to the database through coe_audit.
exports.coe_audit:Record(severity, category, event, context)
⚡
0.00ms Idle Telemetry
Event-driven thread dispatch that stays dormant until network events fire.
Clean Architecture & HAL
03 // EXPORTS

Public API 3

Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.

exports['coe_loot']:Give(playerId, tableId) → CoeLootGiveResult

Rolls a loot table and delivers the result to the player's character inventory.

ParameterType
playerIdinteger
tableIdstring
LUA
local result = exports['coe_loot']:Give(playerId, tableId)
exports['coe_loot']:Roll(tableId) → CoeLootRollResult

Rolls a loot table without delivering the result (for placing loot in a chest, container, or on the ground).

ParameterType
tableIdstring
LUA
local result = exports['coe_loot']:Roll(tableId)
exports['coe_loot']:Tables() → {

Returns the loaded tables. Read access is unrestricted.

No parameters.

LUA
local result = exports['coe_loot']:Tables()
04 // COMMANDS

In-game commands 1

/coe_loot_test <tabela>

Staff tool: rolls a loot table and gives the result to yourself (ACE command.coe_loot_test).