> For the complete documentation index, see [llms.txt](https://sbscripts.gitbook.io/sb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sbscripts.gitbook.io/sb-scripts/sb-fuel/installation.md).

# Installation

### Requirements

* **SB Bridge**, which handles the framework, notifications, text UI, target, vehicle keys, money, items and admin checks
* **oxmysql**

SB Fuel has no settings for anything SB Bridge handles. Pick your framework, notify, text UI, target and keys in SB Bridge, and SB Fuel follows them.

### Steps

1. Put `sbfuel` in your resources folder.
2. Stop and remove any other fuel script, such as LegacyFuel, ps-fuel, cdn-fuel, lj-fuel or ox\_fuel. SB Fuel prints a warning in the server console if one is still running.
3. Add this to `server.cfg`, after your framework, oxmysql and SB Bridge:

```cfg
ensure sbfuel
```

4. Tables are created automatically on first start, and the 1.0 stations table is upgraded. `sql/sbfuel.sql` is included if you'd rather run it yourself.
5. Make sure `weapon_petrolcan` exists in your items or weapons. It does on stock QBCore and Qbox. On ESX, add it to your inventory.

### Standalone and LegacyFuel exports

SB Fuel needs no other fuel resource. Remove LegacyFuel, lc\_fuel and any other fuel script. SB Fuel always answers both `exports['sbfuel']` and `exports['LegacyFuel']` (`GetFuel` and `SetFuel`, client and server). `fxmanifest.lua` declares `provide 'LegacyFuel'`, so resources that list LegacyFuel as a dependency still start. You don't need to edit qb-garages, qb-vehicleshop or your HUD.

### EV charger prop

`prop_electric_01` is a custom model. Put `prop_electric_01.ydr` and `prop_electric_01.ytyp` in `sbfuel/stream/`, plus a `.ytd` if your copy has one. `fxmanifest.lua` loads the `.ytyp` with `data_file 'DLC_ITYP_REQUEST'`. There is no fallback model. If the files are missing, F8 says so and the chargers don't spawn. Keep these files when you update SB Fuel.
