T3 // Vehicles & Fleet

coe_garages

Garages & Fleets

Public, business and job garages with fleets and access control

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_databasecoe_loggingcoe_uicoe_vehiclescoe_businessescoe_vehicle_catalog
coe_garages 10 exports · 1 command

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

01 // OVERVIEW

Garages registered in the admin panel, with 1 to 8 slots and a blip. Public garages store personal vehicles; business garages keep the company fleet, with the owner granting each vehicle to people or to on-duty staff; job garages serve police, hospital and similar. Other resources buy fleet vehicles through the AddBusinessFleet export. Replaces the basic garages (coe_garage).

On FiveM Enhanced

Taking a vehicle out grants the key through coe_vehicles and storing it in the fleet revokes keys: vehicle access follows the business link.

02 // FEATURES

What the module delivers

01

Three Types

Public, business and job.

02

Fleet Access

Granted per person or to on-duty staff.

03

Admin with Catalog

Fleet added from the catalog with vehicle photos.

04

Automatic Keys

Keys granted and revoked on take-out and storage.

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 10

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

exports['coe_garages']:AddBusinessFleet(businessId, model, staff) → any

Adds a vehicle purchased by a business resource (FleetResources, for example coe_fuel) to the business's first business garage and, when staff is true, grants it to the staff. Returns the record ({ id, plate, ... }) or { error }.

ParameterType
businessIdany
modelany
staffany
LUA
local result = exports['coe_garages']:AddBusinessFleet(businessId, model, staff)
exports['coe_garages']:AddFleetVehicle(garageId, model) → any

Export server AddFleetVehicle (server/main.lua).

ParameterType
garageIdany
modelany
LUA
local result = exports['coe_garages']:AddFleetVehicle(garageId, model)
exports['coe_garages']:BusinessFleet(businessId) → any

Export server BusinessFleet (server/main.lua).

ParameterType
businessIdany
LUA
local result = exports['coe_garages']:BusinessFleet(businessId)
exports['coe_garages']:DeleteGarage(garageId) → any

Export server DeleteGarage (server/main.lua).

ParameterType
garageIdany
LUA
local result = exports['coe_garages']:DeleteGarage(garageId)
exports['coe_garages']:ListFleet(garageId) → any

Export server ListFleet (server/main.lua).

ParameterType
garageIdany
LUA
local result = exports['coe_garages']:ListFleet(garageId)
exports['coe_garages']:ListGarages() → any

Export server ListGarages (server/main.lua).

No parameters.

LUA
local result = exports['coe_garages']:ListGarages()
exports['coe_garages']:RemoveFleetVehicle(garageId, vehicleId) → any

Export server RemoveFleetVehicle (server/main.lua).

ParameterType
garageIdany
vehicleIdany
LUA
local result = exports['coe_garages']:RemoveFleetVehicle(garageId, vehicleId)
exports['coe_garages']:SaveGarage(raw) → any

Export server SaveGarage (server/main.lua).

ParameterType
rawany
LUA
local result = exports['coe_garages']:SaveGarage(raw)
exports['coe_garages']:SetFleetStaffAccess(businessId, vehicleId, enabled) → any

Export server SetFleetStaffAccess (server/main.lua).

ParameterType
businessIdany
vehicleIdany
enabledany
LUA
local result = exports['coe_garages']:SetFleetStaffAccess(businessId, vehicleId, enabled)
exports['coe_garages']:TabletCall(playerId, appId, action) → any

Export server TabletCall (server/main.lua).

ParameterType
playerIdany
appIdany
actionany
LUA
local result = exports['coe_garages']:TabletCall(playerId, appId, action)
04 // COMMANDS

In-game commands 1

/coe_fleet_add <garagem> <modelo> [placa]

Adds a vehicle to a business or job garage fleet (ACE command.coe_fleet_add).