T3 // Gameplay & Base

coe_doors

Doors & Locks

Locations with up to 12 doors, access by character, business, faction, item or code

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_loggingcoe_ui
coe_doors 14 exports · 0 commands

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

01 // OVERVIEW

Map and MLO doors and locks, registered in the admin panel per location (house, building, HQ) with up to 12 single, double, garage or gate doors. Access by character, business or job (optionally on duty only), faction with a minimum rank, items (access card) or a code; each door locks separately, with auto-lock.

On FiveM Enhanced

Door leaves are captured by aiming at the object and registered in the game door system: the state applies to everyone, and the server checks distance, access and rate.

02 // FEATURES

What the module delivers

01

Multi-Door Locations

Up to 12 doors per location with shared rules.

02

Access Rules

Character, business, faction, item or code.

03

Garages & Gates

Wider leaves and open/close.

04

Auto-Lock

Default state and auto-lock per door.

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
Presentation & NUI
HTML5 · CSS tokens · CoE UI
CEF DX12
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 // PRESENTATION & NUI

Responsive NUI & CoE UI Design System

Built with vanilla HTML5, CSS3 tokens, and modern JavaScript. No heavyweight frameworks (React/Vue/Electron). Rendered directly in FiveM DX12's Chromium Embedded Framework at 0.00 ms while closed.

Five themes supported in real time through CSS variables (--coe-accent, --coe-surface)
Fully keyboard-navigable (Tab, Esc, Enter) and ARIA-accessible
Secure asynchronous communication with the FiveM client via fetch("https://...")
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 14

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

exports['coe_doors']:CanAccess(playerId, id) → any

Export server CanAccess (server/main.lua).

ParameterType
playerIdany
idany
LUA
local result = exports['coe_doors']:CanAccess(playerId, id)
exports['coe_doors']:Delete(placeId) → any

Export server Delete (server/main.lua).

ParameterType
placeIdany
LUA
local result = exports['coe_doors']:Delete(placeId)
exports['coe_doors']:IsLocked(id) → any

API for other resources (robberies, events, and business scripts). id is <local>:<door> for one door or <local> for every door at that location.

ParameterType
idany
LUA
local result = exports['coe_doors']:IsLocked(id)
exports['coe_doors']:IsReady() → any

Export server IsReady (server/main.lua).

No parameters.

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

Export server List (server/main.lua).

No parameters.

LUA
local result = exports['coe_doors']:List()
exports['coe_doors']:Save(raw) → any

Export server Save (server/main.lua).

ParameterType
rawany
LUA
local result = exports['coe_doors']:Save(raw)
exports['coe_doors']:SetLocked(id, locked) → any

Export server SetLocked (server/main.lua).

ParameterType
idany
lockedany
LUA
local result = exports['coe_doors']:SetLocked(id, locked)
exports['coe_doors']:TabletCall(playerId, _, action, payload) → any

Export server TabletCall (server/main.lua).

ParameterType
playerIdany
_any
actionany
payloadany
LUA
local result = exports['coe_doors']:TabletCall(playerId, _, action, payload)
exports['coe_doors']:TabletVisible(playerId) → any

Export server TabletVisible (server/main.lua).

ParameterType
playerIdany
LUA
local result = exports['coe_doors']:TabletVisible(playerId)
exports['coe_doors']:UpgradeSmartLock(placeId, entryKey, smartLockSpec) → boolean

Instala ou atualiza a fechadura eletrônica 3-em-1 em uma porta.

ParameterType
placeIdstring
entryKeystring
smartLockSpectable
LUA
local result = exports['coe_doors']:UpgradeSmartLock(placeId, entryKey, smartLockSpec)
exports['coe_doors']:RotateKeyEpoch(placeId, entryKey) → integer|nil

Rotaciona o epoch criptográfico (HMAC-SHA256) invalidando cartões antigos instantaneamente.

ParameterType
placeIdstring
entryKeystring
LUA
local result = exports['coe_doors']:RotateKeyEpoch(placeId, entryKey)
exports['coe_doors']:IssueKeycardMetadata(placeId, entryKey, holderCharId, expiresAt) → table|nil

Gera os metadados assinados via HMAC-SHA256 para gravação de um Keycard físico.

ParameterType
placeIdstring
entryKeystring
holderCharIdany
expiresAtinteger|nil
LUA
local result = exports['coe_doors']:IssueKeycardMetadata(placeId, entryKey, holderCharId, expiresAt)
exports['coe_doors']:SetBlackout(placeId, active) → boolean

Define o estado de contingência elétrica (blackout) para as portas de um espaço.

ParameterType
placeIdstring
activeboolean
LUA
local result = exports['coe_doors']:SetBlackout(placeId, active)
exports['coe_doors']:IsBlackout(placeId) → boolean

Retorna se o espaço está atualmente em contingência elétrica (blackout).

ParameterType
placeIdstring
LUA
local result = exports['coe_doors']:IsBlackout(placeId)
04 // COMMANDS

In-game commands 0

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