T3 // Public Safety

coe_police

Police

Cuff, fine, search, seize, escort and jail on top of coe_businesses

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_loggingcoe_businessescoe_economycoe_inventory
coe_police 12 exports · 7 commands

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

01 // OVERVIEW

Plug-and-play police on top of coe_businesses and coe_economy: staff, ranks and salaries live in the police-category business (stations). Actions /algemar, /soltar, /multar, /revistar, /apreender, /escoltar and /prender, each with a rank permission, all validated on the server (duty, category, rank, target state and distance). Fines go to the society account and to the criminal record.

On FiveM Enhanced

No parallel officer list: anyone on duty in a police business with the rank permission can act.

02 // FEATURES

What the module delivers

01

Rank Permissions

police.cuff, fine, jail, records, search, seize and escort.

02

Server Validation

Duty, rank, state and distance checked.

03

Fines to Society

Revenue goes to the station cash.

04

Criminal Record

Fines and arrests recorded per character.

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 12

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

exports['coe_police']:Arrest(officerSource, targetSource, minutes, charge) → any

Export server Arrest (server/main.lua).

ParameterType
officerSourceany
targetSourceany
minutesany
chargeany
LUA
local result = exports['coe_police']:Arrest(officerSource, targetSource, minutes, charge)
exports['coe_police']:Cuff(officerSource, targetSource) → any

Export server Cuff (server/main.lua).

ParameterType
officerSourceany
targetSourceany
LUA
local result = exports['coe_police']:Cuff(officerSource, targetSource)
exports['coe_police']:Escort(officerSource, targetSource) → any

Export server Escort (server/main.lua).

ParameterType
officerSourceany
targetSourceany
LUA
local result = exports['coe_police']:Escort(officerSource, targetSource)
exports['coe_police']:Fine(officerSource, targetSource, amount, charge) → any

Export server Fine (server/main.lua).

ParameterType
officerSourceany
targetSourceany
amountany
chargeany
LUA
local result = exports['coe_police']:Fine(officerSource, targetSource, amount, charge)
exports['coe_police']:IsCuffed(source) → any

Export server IsCuffed (server/main.lua).

ParameterType
sourceany
LUA
local result = exports['coe_police']:IsCuffed(source)
exports['coe_police']:IsEscorted(source) → any

Export server IsEscorted (server/main.lua).

ParameterType
sourceany
LUA
local result = exports['coe_police']:IsEscorted(source)
exports['coe_police']:IsJailed(source) → any

Export server IsJailed (server/main.lua).

ParameterType
sourceany
LUA
local result = exports['coe_police']:IsJailed(source)
exports['coe_police']:Records(officerSource, subjectCharacterId, limit) → any

Returns a character's criminal record. Requires police.records in a police-category business.

ParameterType
officerSourceany
subjectCharacterIdany
limitany
LUA
local result = exports['coe_police']:Records(officerSource, subjectCharacterId, limit)
exports['coe_police']:RegisterArrestInterceptor(def) → true|{

Registra um interceptador de jurisdição para prisões/multas (ex.: transferência de custódia). Requer ACE coe.police.extend.

ParameterType
def{
LUA
local result = exports['coe_police']:RegisterArrestInterceptor(def)
exports['coe_police']:Seize(officerSource, targetSource, slot, count) → any

Export server Seize (server/main.lua).

ParameterType
officerSourceany
targetSourceany
slotany
countany
LUA
local result = exports['coe_police']:Seize(officerSource, targetSource, slot, count)
exports['coe_police']:Uncuff(officerSource, targetSource) → any

Export server Uncuff (server/main.lua).

ParameterType
officerSourceany
targetSourceany
LUA
local result = exports['coe_police']:Uncuff(officerSource, targetSource)
04 // COMMANDS

In-game commands 7

/algemar <id>

Cuffs the player (police.cuff permission, on duty).

/apreender <id> <slot> <qtd>

Seizes an item from the cuffed player (police.seize).

/escoltar <id>

Escorts the cuffed player (police.escort).

/multar <id> <valor> <motivo>

Fines the player; revenue goes to the station society (police.fine).

/prender <id> <minutos> [motivo]

Jails the cuffed player for the given time and records it (police.jail).

/revistar <id>

Searches the cuffed player inventory (police.search).

/soltar <id>

Uncuffs the player (police.cuff).