Installation

Dependencies

DependencyRequiredWhy
ox_libYes3.22.0 or newer. Menus, text UI and language files
hz_libNo, recommendedFree. Finds your framework, inventory and notifications for you, and brings the dialogue box, the on-screen objectives and the dispatch tablet
HZ-TextUiNo3D prompts at the pumps. Without it, ox_lib's text UI shows the prompts
Framework (ESX / QBCore / Qbox / ox_core)NoDetected on its own. Standalone works too, see Payment
An inventoryNoOnly for jerry cans. See Jerry can
DatabaseNoNone. Station stocks and jerry can levels are saved by the server, no SQL

Steps

  1. Drop the hz_fuel folder into your resources directory.
  2. Remove the fuel script you were using (LegacyFuel, ox_fuel, qb-fuel, cdn-fuel, ps-fuel…). Your other scripts keep working: HZ-Fuel answers in its place.
  3. Add HZ-Fuel to your server.cfg, after ox_lib, your framework, your inventory and hz_lib:
ensure ox_lib
# your framework and inventory here
ensure hz_lib
ensure hz_textui   # optional
ensure hz_fuel
  1. Set your prices in config.lua (fuelTypes), then restart the server.
One fuel script at a time. Two fuel systems drain and refill the same vehicles. If another fuel script still runs, the server console says so in red at startup.

What you should see

  • At startup, the server console prints the framework, the inventory and the payment mode HZ-Fuel found.
  • Station blips on the map.
  • Park at a modern pump and get out: the Take the nozzle prompt appears, and the pump's screen shows the prices.
  • At the country stations (Sandy Shores, Grapeseed, Harmony, Route 68, Paleto Boulevard…), the attendant waits by the pumps.
  • The electric chargers show their welcome screen.

Updating

After an update, restart the whole server, not restart hz_fuel alone. When HZ-Fuel is restarted on its own, players already connected see the names it replaces (LegacyFuel, ox_fuel…) as not running until they reconnect. That is a FiveM limit, and scripts that check for those names, like cruise control or some HUDs, lose the fuel level in the meantime.

config.lua, data/ and locales/ are yours: keep a copy before you replace the folder.


The delivery job

Only members of the fueldelivery job can take a delivery shift. HZ-Fuel adds the job to your framework when it is missing:

FrameworkWhat happens
QBCore / QboxAdded in memory at every start. Nothing is written to your files, and a fueldelivery job in your shared/jobs.lua wins
ESX (with ESX.CreateJob)Written once to the jobs and job_grades tables
Older ESXRun the SQL below once
ox_coreCreate the group yourself
INSERT INTO jobs (name, label) VALUES ('fueldelivery', 'Fuel Delivery');
INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
  ('fueldelivery', 0, 'trainee', 'Trainee', 20, '{}', '{}'),
  ('fueldelivery', 1, 'driver', 'Driver', 35, '{}', '{}'),
  ('fueldelivery', 2, 'senior', 'Senior Driver', 50, '{}', '{}'),
  ('fueldelivery', 3, 'supervisor', 'Supervisor', 65, '{}', '{}');

Players get the job like any other: add fueldelivery to your city hall's job list (qbx_cityhall config/shared.lua > employment.jobs, qb-cityhall Config.AvailableJobs), a boss menu, or /setjob. To let everyone work, set delivery.jobs = false. The whole job is in Fuel delivery job.


Maps that replace the pumps

HZ-Fuel works on the game's pump models. A few paid maps swap them for their own model: that station then has no screen, no nozzle and no prompt. The [compatibility] folder shipped with the resource explains how to give such a map the game's pumps back.

MapStatus
Gabz ESB LTD (Grove Street LTD, Davis)Replaces the 6 pumps: follow [compatibility]/[gabz-esbltd]/readme.txt (6 lines to change in one map file)
Gabz Harmony, Gabz Fire DepartmentCompatible, nothing to do
Another map? Open its map files near the station in CodeWalker, look at the model of each pump and put the game model back: prop_gas_pump_1a / 1b / 1c / 1d, prop_gas_pump_old2 / old3 or prop_vintage_pump. Adding the map's model to pumpModels is not enough: the hose, the screen and the card slot are fitted to each model. Ask us on Discord and we add the map to the folder.