T3 // Underworld & Cyber

coe_factions

Illegal Factions

Gangs, mafias and chop shops with ranks, members and unlocked crafts

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_logging
coe_factions 17 exports · 0 commands

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

01 // OVERVIEW

Illegal factions (gangs, mafias, ghettos, chop shops and more): registry, ranks 0 to 9, members (offline included, and a character can be in several), crafting recipes unlocked by minimum rank and physical stations (benches and stashes). Everything is created and edited in the admin panel; legal jobs belong to businesses.

On FiveM Enhanced

An inactive faction unlocks no crafts and exposes no benches or stashes, but keeps its members: a faction can be paused without losing anything.

02 // FEATURES

What the module delivers

01

Ranks 0–9

Hierarchy with a name per rank.

02

Crafts by Rank

Recipes unlocked from a minimum rank.

03

Physical Stations

Faction benches and stashes in the world.

04

Multiple Factions

A character can belong to more than one.

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 17

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

exports['coe_factions']:CanCraft(characterId, recipeId) → any

Export server CanCraft (server/main.lua).

ParameterType
characterIdany
recipeIdany
LUA
local result = exports['coe_factions']:CanCraft(characterId, recipeId)
exports['coe_factions']:CanCraftInFaction(factionId, characterId, recipeId) → any

Export server CanCraftInFaction (server/main.lua).

ParameterType
factionIdany
characterIdany
recipeIdany
LUA
local result = exports['coe_factions']:CanCraftInFaction(factionId, characterId, recipeId)
exports['coe_factions']:Categories() → any

Export server Categories (server/main.lua).

No parameters.

LUA
local result = exports['coe_factions']:Categories()
exports['coe_factions']:Delete(factionId) → any

Export server Delete (server/main.lua).

ParameterType
factionIdany
LUA
local result = exports['coe_factions']:Delete(factionId)
exports['coe_factions']:Get(factionId) → any

Export server Get (server/main.lua).

ParameterType
factionIdany
LUA
local result = exports['coe_factions']:Get(factionId)
exports['coe_factions']:IsReady() → any

Export server IsReady (server/main.lua).

No parameters.

LUA
local result = exports['coe_factions']:IsReady()
exports['coe_factions']:List() → any

Export server List (server/main.lua).

No parameters.

LUA
local result = exports['coe_factions']:List()
exports['coe_factions']:Members(factionId) → any

Export server Members (server/main.lua).

ParameterType
factionIdany
LUA
local result = exports['coe_factions']:Members(factionId)
exports['coe_factions']:Memberships(characterId) → any

Export server Memberships (server/main.lua).

ParameterType
characterIdany
LUA
local result = exports['coe_factions']:Memberships(characterId)
exports['coe_factions']:PauseMenuFaction(characterId) → any

Returns the first active faction for the character's dossier in the pause menu dossier providers.

ParameterType
characterIdany
LUA
local result = exports['coe_factions']:PauseMenuFaction(characterId)
exports['coe_factions']:RecipesFor(characterId) → any

Export server RecipesFor (server/main.lua).

ParameterType
characterIdany
LUA
local result = exports['coe_factions']:RecipesFor(characterId)
exports['coe_factions']:RecipesForFaction(factionId, characterId) → any

Returns recipes specifically unlocked for this member of the faction, or nil if they are not a member or the faction is inactive.

ParameterType
factionIdany
characterIdany
LUA
local result = exports['coe_factions']:RecipesForFaction(factionId, characterId)
exports['coe_factions']:RemoveMember(factionId, characterId) → any

Export server RemoveMember (server/main.lua).

ParameterType
factionIdany
characterIdany
LUA
local result = exports['coe_factions']:RemoveMember(factionId, characterId)
exports['coe_factions']:Save(raw) → any

Export server Save (server/main.lua).

ParameterType
rawany
LUA
local result = exports['coe_factions']:Save(raw)
exports['coe_factions']:SetMember(factionId, characterId, grade) → any

Export server SetMember (server/main.lua).

ParameterType
factionIdany
characterIdany
gradeany
LUA
local result = exports['coe_factions']:SetMember(factionId, characterId, grade)
exports['coe_factions']:TabletCall(playerId, appId, action, payload, factionId) → any

Export server TabletCall (server/main.lua).

ParameterType
playerIdany
appIdany
actionany
payloadany
factionIdany
LUA
local result = exports['coe_factions']:TabletCall(playerId, appId, action, payload, factionId)
exports['coe_factions']:TabletInstances(playerId) → any

Export server TabletInstances (server/main.lua).

ParameterType
playerIdany
LUA
local result = exports['coe_factions']:TabletInstances(playerId)
04 // COMMANDS

In-game commands 0

This module registers no commands: it is driven by exports and events.