Four Fuels
Own price, consumption, power and engine effect.
coe_fuelFuel & Gas Stations
Four fuels, pumps, jerry can, player stations and refinery
coe_corecoe_databasecoe_loggingcoe_inventorycoe_businessescoetarget
coe_fuel
6 exports · 3 commands
Runs without a NUI: nothing is rendered on the client and the resource stays idle until events arrive.
COE fuel: vehicle consumption with four fuels (regular, premium, ethanol and diesel) mixed in the tank, every map station branded, pumps with payment and a jerry can. Player-owned stations have tiered tanks, a per-liter price set by the owner, a supply fleet (van → truck → tanker) loaded at the refinery and upgrades unlocked by money and liters sold.
The tank stores the mix in liters of each fuel: consumption, power and engine wear are the real average of what was pumped.
Own price, consumption, power and engine effect.
What goes into the tank defines behavior.
Stock, price and fleet run by the owner.
Progression by money and sales history.
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_fuel']:IsReady()
→ boolean
Returns whether migrations have been applied and station tanks have been loaded.
No parameters.
local result = exports['coe_fuel']:IsReady()exports['coe_fuel']:GetFuel(vehicleId)
→ CoeFuelSummary|nil
Returns the fuel state for a registered vehicle currently in use, or nil.
| Parameter | Type |
|---|---|
vehicleId | string|integer |
local result = exports['coe_fuel']:GetFuel(vehicleId)exports['coe_fuel']:GetEffects(vehicleId)
→ table|nil
Returns the engine effect of the fuel mix for coe_handling (power from ethanol and premium fuel). Returns nil when no tank is in use.
| Parameter | Type |
|---|---|
vehicleId | string|integer |
local result = exports['coe_fuel']:GetEffects(vehicleId)exports['coe_fuel']:GetStationTanks(stationId)
→ table|nil
Returns a station's tanks (player-owned stations can sell only the fuel stored here), including each fuel type's level and capacity.
| Parameter | Type |
|---|---|
stationId | string |
local result = exports['coe_fuel']:GetStationTanks(stationId)exports['coe_fuel']:IsStation(businessId)
→ boolean
Checks whether the business ID belongs to a coe_fuel station. Used by the business app to show the Station tab.
| Parameter | Type |
|---|---|
businessId | string |
local result = exports['coe_fuel']:IsStation(businessId)exports['coe_fuel']:BusinessTablet(playerId, characterId, businessId, payload)
→ table
Handles the Station tab in the business app on the tablet. Only coe_businesses calls it (app access is checked there). payload.op: overview, price (fuel, price; false restores the table price), upgradeTank (fuel), or upgradeFleet. Errors: forbidden, not_ready, not_a_station, staff_station, invalid_price, not_enough_sales, insufficient_funds, max_level, no_fleet_garage.
| Parameter | Type |
|---|---|
playerId | integer |
characterId | string |
businessId | string |
payload | table |
local result = exports['coe_fuel']:BusinessTablet(playerId, characterId, businessId, payload)/coe_fuel_fill [id do jogador] [combustível]
Staff tool: fills the tank of the vehicle the player is in (ACE).
/coe_fuel_tank <posto> <combustível> <litros>
Staff tool: sets a fuel stock at a station (tests and fixes, ACE).
/combustivel
Diagnostics: shows the current vehicle tank level and mix.