T2 // Vehicles & Fleet

coe_rentals

Vehicle Rentals with Deposit

A bike, scooter or compact car for new citizens, with the deposit returned on drop-off

HEADLESS SERVICE (NO UI)
DEPENDS ON coe_corecoe_economycoe_vehicles
coe_rentals 5 exports · 0 commands

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

01 // OVERVIEW

Rental stations around the map for players who do not own a vehicle yet. The player pays the rental plus a deposit at the counter and gets the deposit back when returning the vehicle to the returnZone of any station. One active rental per character; catalog, prices and stations live in config.lua.

On FiveM Enhanced

Fail-closed charging: with coe_economy down nobody rents for free. The server checks the distance to the counter and the request cooldown, refunds if the vehicle cannot be created and logs any failure to return the deposit.

02 // FEATURES

What the module delivers

01

Starter Catalog

Tri-Bike, Faggio, Panto and Blista with configurable price and deposit.

02

Deposit Returned

Drop the vehicle at any station and the deposit goes back to the account through the economy.

03

Fail-Closed Charging

An unavailable economy refuses the rental; a failed spawn refunds the charge.

04

Server-Side Validation

Counter distance, return zone and cooldown are checked before charging.

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 5

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

exports['coe_rentals']:GetActiveRental(characterId) → ActiveRentalInfo|nil

Returns the active vehicle rental record for a character or `nil`.

ParameterType
characterIdstring
LUA
local result = exports['coe_rentals']:GetActiveRental(characterId)
exports['coe_rentals']:ListStations() → RentalStationDef[]

Registered rental stations. Only `AdminResources`/ACE `coe.rentals.admin`.

No parameters.

LUA
local result = exports['coe_rentals']:ListStations()
exports['coe_rentals']:SaveStation(raw) → RentalStationDef|table

Creates or updates a rental station (attendant, pickup points, return zone, models, blip).

ParameterType
rawRentalStationDef
LUA
local result = exports['coe_rentals']:SaveStation(raw)
exports['coe_rentals']:DeleteStation(stationId) → boolean|table

Removes a rental station.

ParameterType
stationIdstring
LUA
local result = exports['coe_rentals']:DeleteStation(stationId)
exports['coe_rentals']:Catalog() → RentalVehicleDef[]

Rental vehicle catalog (config.lua).

No parameters.

LUA
local result = exports['coe_rentals']:Catalog()
04 // COMMANDS

In-game commands 0

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