Skip to content

Installation

Installation

Start the resource, pick a language, add the jerry can item. There is no SQL file to import.

1. Dependencies

Resource Required Why
ox_lib Yes Callbacks, notifications, text UI, locales
oxmysql Yes Station ownership, stock, banks and staff
An inventory Yes The jerry can item and the EV battery item
A targeting resource Optional Only if Config.Interaction = 'target'

2. server.cfg — ensure order

Start bupa-fuel after the resources it depends on.

server.cfg
ensure ox_lib
ensure oxmysql
ensure ox_inventory
ensure ox_target
ensure bupa-fuel

3. Database

Nothing to import. On first start the resource creates its own tables if they do not exist:

Table Holds
bupa_fuel_stations Owner, bank balance, stock per fuel, sell prices, upgrades and stats
bupa_fuel_employees Staff per station: name, wage and permissions

Both are created with CREATE TABLE IF NOT EXISTS, so a restart never touches data that is already there. Vehicle fuel levels are not stored in the database — they live on the vehicle's state bag and are shared between clients from there.

4. Language

Language is global and comes from ox_lib, not from a config value.

server.cfg
setr ox:locale "tr"

5. The jerry can item

The can is an inventory item and has to exist in your inventory before anyone can use one. The resource ships everything for it in install/ — the icon in install/img/, and one file per inventory in install/inv/.

See The jerry can for the per-inventory entry.

Do not use weapon_petrolcan. It is a weapon, and handing it out lets players pour fuel on the ground and set it alight. The item this resource uses is a plain item named jerrycan.

6. Check it works

  • Get in any car and drive. The tank drains, and below 15% you get a low-fuel warning.
  • Walk to a pump at any station. You should get a target option or an [E] prompt depending on Config.Interaction.
  • Walk to the $ marker at a station. Unowned and purchasable, it offers you the place; once you own it, it opens the dashboard.
  • Run /fueladmin. If it refuses, see Admin.