ESX Installation

Install oxide-fire on ESX — the fire job in the jobs tables or by job table sync, the scba item, the department treasury and the ESX settings.

ESX-specific steps for oxide-fire. Follow Installation first. This page only covers what is different on ESX.

Add a fire job

ESX does not ship a fire job, so add one. A fire department in oxide-fire is tied to a job with the same name: hiring a firefighter sets their ESX job to it. ESX keeps its jobs in two database tables, jobs and job_grades.

You have two ways to add it. Pick one.

Option A: let oxide-fire write the job for you

Create your department and its grades in /fire admin first (see Installation, First-time setup in game).
Open /fire settings, switch to the Advanced tier, and go to Framework Compat → ESX → Job table sync.
Turn on Enabled and save.
Restart oxide-fire (type restart oxide-fire in the server console), or restart the server.

From then on, oxide-fire writes every department into jobs and every grade into job_grades when it starts, and again whenever a department or grade changes. A department named after a job that already exists updates that job instead of adding a second one.

With Zero framework salary on (the default), the ESX grade salary is written as 0, so firefighters are not paid twice. See ESX settings.

Option B: add the job yourself

Run this in your database tool (for example HeidiSQL or phpMyAdmin), on your server's database:

INSERT INTO jobs (name, label) VALUES ('fire', 'Fire Department');

INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
    ('fire', 0, 'recruit',     'Recruit',     0, '{}', '{}'),
    ('fire', 1, 'firefighter', 'Firefighter', 0, '{}', '{}'),
    ('fire', 2, 'lieutenant',  'Lieutenant',  0, '{}', '{}'),
    ('fire', 3, 'chief',       'Chief',       0, '{}', '{}');

A few things matter here:

  • The job name (fire above) must be the same as the department's internal name in /fire admin. Use lowercase.
  • The grade numbers should match the rank numbers of the grades you create in /fire admin.
  • The salary is 0 on purpose. oxide-fire pays its own salaries while on duty, so an ESX salary would pay firefighters twice.

Restart the server afterwards so ESX loads the new job.

Register the scba item

Firefighters need one item, scba. How you add it depends on your inventory.

ESX needs an inventory resource that o-link supports, such as ox_inventory, qs-inventory, core_inventory, codem-inventory, tgiann-inventory, origen_inventory or hex_4_inventory. ESX's built-in inventory is not one of them. Without a supported inventory, the scba item, gear-room loadouts, personal lockers and apparatus equipment compartments do not work.

oxide-fire makes the item usable itself, so once it is registered there is nothing else to add.

ox_inventory

The entry is ready to paste in itemimages/ox_inventory_items.lua:

ox_inventory/data/items.lua
['scba'] = { label = 'SCBA', weight = 11000, stack = false, close = true, description = 'Breathing apparatus: a face mask and an air cylinder for working in smoke.' },
Open ox_inventory/data/items.lua.
Paste the entry above the file's final closing brace }.
If your file already has an item named scba, keep only one copy.
Save the file.

Inventories that read ESX's items table

Some inventories (for example hex_4_inventory) take their items from ESX's items database table. Add the item by running this in your database tool:

INSERT INTO items (name, label, weight, rare, can_remove) VALUES ('scba', 'SCBA', 11, 0, 1);

ESX weights are in kilograms, so 11 is about 11 kg. The item name must stay exactly scba. Restart the server afterwards so the inventory loads it.

Another inventory

Register an item named scba using that inventory's own instructions: label "SCBA", about 11 kg, not stackable, usable.

Equipment for the gear room

Fire extinguishers and hatchets are game weapons. If your inventory treats weapons as items, add them to a gear-room loadout in /fire admin → Gear Room. The item search there lists every item your inventory knows.

Copy the image

Copy itemimages/scba.png into your inventory's image folder, for example:

ox_inventory/web/images/

Without an image the item still works, it just shows a blank icon.

The department treasury on ESX

Use banking accounts (under Duty & Payroll in /fire settings) is on by default. It needs a banking resource that o-link supports, such as oxide-banking, okokBanking, wasabi_banking, fd_banking or tgg-banking.

ESX's own society accounts are not one of them. If you do not run one of those banking resources, turn off Use banking accounts. oxide-fire then keeps each department's balance itself. It starts at 0, so fund the department from /fire admin → Overview → Fund.

ESX settings

Under Framework Compat → ESX → Job table sync in /fire settings (Advanced tier):

SettingDefaultWhat it does
EnabledOffWrites your departments and grades into ESX's jobs and job_grades tables.
Sync on startOnSync when oxide-fire starts.
Sync on changeOnSync whenever a department or grade changes.
Zero framework salaryOnWrites 0 as the ESX grade salary, so firefighters are not paid twice.
Job typefireWritten to the jobs.type column, if your jobs table has one. Tables without that column are handled.

Changes here fully apply after a restart of oxide-fire.

Restart the whole server

Not restart oxide-fire. The hose nozzle, coupling and SCBA backpack models are streamed, and they only load when the server starts. See Installation, Restart the whole server.

Verification on ESX

The server starts with no oxide-fire errors in the console.
/fire admin opens. Create a department with the internal name fire and grades ranked 0 to 3.
If you use job sync, check the jobs and job_grades tables for your department after oxide-fire restarts.
Hire yourself with /fire hire <your id> fire 0. Your ESX job should now be "Fire Department".
Clock in at the station.
Give yourself an scba and use it. The mask should go on with an SCBA air timer on screen.
Check the treasury in the admin panel shows a balance. If it shows 0 with no banking resource, see The department treasury on ESX.