Hardware Abstraction Layer
No gameplay script invokes GTA natives directly; all interactions route through the HAL.
coe_coreHAL & Central State Management
Hardware Abstraction Layer & Player Session State Manager
coe_supervisorcoe_databasecoe_logging
coe_core
9 exports · 3 commands
Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.
The architectural heart of the framework. Implements the Hardware Abstraction Layer (HAL) in `@coe_core/lib/platform.lua` shielding server logic from GTA engine alterations. Responsible for player authentication, session handling, StateID synchronization, and internal reactive event routing.
Architected specifically for FiveM Enhanced native APIs, completely isolating business rules from low-level graphics engine natives.
No gameplay script invokes GTA natives directly; all interactions route through the HAL.
Persistent unique citizen identifier preserved across disconnections and reconnects.
Strict runtime type verification on client-server events protecting against malicious payloads.
Enforces cryptographically signed login handshakes to prevent session impersonation.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
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.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
SetPlayerRoutingBucket(src, bucket)
/grupo definir <stateId> <grupo> [grau]
exports.coe_core:SetPlayerGroup(source, name, grade, callback)
Typed contracts to call from other resources. Full types live in types.lua and in the docs reference.
exports['coe_core']:GetCoreObject()
→ table
Returns the central Core framework object (events, players, permissions, HAL, and state bags). Available on both server and client.
No parameters.
local result = exports['coe_core']:GetCoreObject()exports['coe_core']:GetCharacterByStateId(stateId)
→ table|nil, string|nil
Retrieves an active online character by their unique stateId. Server-side.
| Parameter | Type |
|---|---|
stateId | string |
local ok, detail = exports['coe_core']:GetCharacterByStateId(stateId)exports['coe_core']:GetActiveCharacter(source)
→ table|nil
Retrieves the currently selected active character for an online player. Server-side.
| Parameter | Type |
|---|---|
source | integer |
local result = exports['coe_core']:GetActiveCharacter(source)exports['coe_core']:GetPlayerByStateId(stateId)
→ table|nil, string|nil
Retrieves online player data by character stateId. Server-side.
| Parameter | Type |
|---|---|
stateId | string |
local ok, detail = exports['coe_core']:GetPlayerByStateId(stateId)exports['coe_core']:ValidateSession(source, expectedCharacterId, expectedGeneration)
→ boolean, table|string
Valida se a sessão do jogador ainda corresponde ao personagem e à geração esperados (proteção contra reciclagem de source no FiveM Enhanced). Server.
| Parameter | Type |
|---|---|
source | integer |
expectedCharacterId | string|nil |
expectedGeneration | integer|nil |
local ok, detail = exports['coe_core']:ValidateSession(source, expectedCharacterId, expectedGeneration)exports['coe_core']:GetGroupDefinitions()
→ CoeGroupDefinition[]
Returns all permission and organizational group definitions configured on the server. Server-side.
No parameters.
local result = exports['coe_core']:GetGroupDefinitions()exports['coe_core']:GetPlayerGroups(source)
→ table[]|nil
Retrieves all group memberships and grades for a player's active character. Server-side.
| Parameter | Type |
|---|---|
source | integer |
local result = exports['coe_core']:GetPlayerGroups(source)exports['coe_core']:SetPlayerGroup(source, name, grade, callback)
→ true|string
Assigns a group and grade to a player. Requires ACE `coe.groups.admin` on caller principal. Server-side.
| Parameter | Type |
|---|---|
source | integer |
name | string |
grade | integer |
callback | fun(success: |
local result = exports['coe_core']:SetPlayerGroup(source, name, grade, callback)exports['coe_core']:RemovePlayerGroup(source, name, callback)
→ true|string
Revokes a group membership from a player. Requires ACE `coe.groups.admin` on caller principal. Server-side.
| Parameter | Type |
|---|---|
source | integer |
name | string |
callback | fun(success: |
local result = exports['coe_core']:RemovePlayerGroup(source, name, callback)[E]
Interact · +coe_interact · rebindable in FiveM key bindings
/grupo lista | ver <stateId> | definir <stateId> <grupo> [grau] | remover <stateId> <grupo>
Lists groups, shows a character groups and sets or removes a group (ACE-restricted command).
/id
Shows the active character StateID.