Multi-Door Locations
Up to 12 doors per location with shared rules.
coe_doorsDoors & Locks
Locations with up to 12 doors, access by character, business, faction, item or code
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.
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.
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.
Up to 12 doors per location with shared rules.
Character, business, faction, item or code.
Wider leaves and open/close.
Default state and auto-lock per door.
Every COE Framework script strictly follows the principle of separation of concerns. Interact with the 3D stack below:
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.
Manage your city without relying on developers. Runtime parameters, auditing, and ACE-protected commands:
IsPlayerAceAllowed(src, "coe.admin")
exports.coe_audit:Record(severity, category, event, context)
Clean Architecture & HAL
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).
| Parameter | Type |
|---|---|
playerId | any |
id | any |
local result = exports['coe_doors']:CanAccess(playerId, id)exports['coe_doors']:Delete(placeId)
→ any
Export server Delete (server/main.lua).
| Parameter | Type |
|---|---|
placeId | any |
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.
| Parameter | Type |
|---|---|
id | any |
local result = exports['coe_doors']:IsLocked(id)exports['coe_doors']:IsReady()
→ any
Export server IsReady (server/main.lua).
No parameters.
local result = exports['coe_doors']:IsReady()exports['coe_doors']:List()
→ any
Export server List (server/main.lua).
No parameters.
local result = exports['coe_doors']:List()exports['coe_doors']:Save(raw)
→ any
Export server Save (server/main.lua).
| Parameter | Type |
|---|---|
raw | any |
local result = exports['coe_doors']:Save(raw)exports['coe_doors']:SetLocked(id, locked)
→ any
Export server SetLocked (server/main.lua).
| Parameter | Type |
|---|---|
id | any |
locked | any |
local result = exports['coe_doors']:SetLocked(id, locked)exports['coe_doors']:TabletCall(playerId, _, action, payload)
→ any
Export server TabletCall (server/main.lua).
| Parameter | Type |
|---|---|
playerId | any |
_ | any |
action | any |
payload | any |
local result = exports['coe_doors']:TabletCall(playerId, _, action, payload)exports['coe_doors']:TabletVisible(playerId)
→ any
Export server TabletVisible (server/main.lua).
| Parameter | Type |
|---|---|
playerId | any |
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.
| Parameter | Type |
|---|---|
placeId | string |
entryKey | string |
smartLockSpec | table |
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.
| Parameter | Type |
|---|---|
placeId | string |
entryKey | string |
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.
| Parameter | Type |
|---|---|
placeId | string |
entryKey | string |
holderCharId | any |
expiresAt | integer|nil |
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.
| Parameter | Type |
|---|---|
placeId | string |
active | boolean |
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).
| Parameter | Type |
|---|---|
placeId | string |
local result = exports['coe_doors']:IsBlackout(placeId)This module registers no commands: it is driven by exports and events.