Installation
Dependencies
| Dependency | Required | Why |
|---|---|---|
| ox_lib | Yes | 3.22.0 or newer. Menus, text UI and language files |
| hz_lib | No, recommended | Free. Finds your framework, inventory and notifications for you, and brings the dialogue box, the on-screen objectives and the dispatch tablet |
| HZ-TextUi | No | 3D prompts at the pumps. Without it, ox_lib's text UI shows the prompts |
| Framework (ESX / QBCore / Qbox / ox_core) | No | Detected on its own. Standalone works too, see Payment |
| An inventory | No | Only for jerry cans. See Jerry can |
| Database | No | None. Station stocks and jerry can levels are saved by the server, no SQL |
Steps
- Drop the
hz_fuelfolder into yourresourcesdirectory. - 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.
- 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
- Set your prices in
config.lua(fuelTypes), then restart the server.
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:
| Framework | What happens |
|---|---|
| QBCore / Qbox | Added 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 ESX | Run the SQL below once |
| ox_core | Create 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.
| Map | Status |
|---|---|
| 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 Department | Compatible, nothing to do |
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.