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

# Cuxial Fuel

Fuel system for FiveM with pumps, fuel types, electric chargers, jerry cans and an interactive screen on the pump itself.

Cuxial Fuel gives every vehicle a fuel level, a tank size and a fuel type, and turns the pumps of the map into working pumps. The purchase is made on a screen drawn on the pump itself, and the fuel is served with a nozzle the player carries to the vehicle.

## What it does

* **Fuel consumption** by engine RPM, vehicle class and fuel type, with a tank size per class or per model.
* **Four fuels**: regular, plus, premium and diesel. Changing fuel empties the tank first, and the wrong fuel breaks the engine.
* **Electric vehicles** with their own chargers, in fast and normal mode.
* **Interactive screen on the pump**: prices while idle, and the whole purchase (fuel, litres, payment) with the game cursor when a player uses it. Models without a screen open a regular panel instead.
* **Nozzle with a hose**: pay, take the nozzle, plug it into the tank, stop whenever you want and return it to the pump. Unused litres are refunded.
* **Spills**: start the engine with the nozzle plugged in and drive off, and the nozzle pops out.
* **Jerry cans** sold at the pump and used from the inventory.
* **Price totems** at the stations, with prices, stock and promotions.
* **Job discounts** for players on duty.
* **Consumption chart** for the driver, with fuel, speed and litres per second.
* **Native sounds** for the nozzle, the flow and the till, also heard by nearby players.
* **Extra pumps and chargers** placed by coordinates (rooftops, helipads, docks, airfields).
* **Fuel exports** on client and server, plus the vehicle state bag `fuel`.

## How a refuel goes

1. The player walks up to a pump and picks **Refuel** (or **Charge** on a charger).
2. The camera frames the pump screen. The player chooses the fuel and the litres and pays with one of the allowed accounts.
3. The nozzle goes to the player's hand. At the vehicle's fuel cap, **Refuel** starts the flow and **Stop refueling** pauses it.
4. Back at the pump, **Return the nozzle** closes the purchase and refunds what was paid and not served.

Walking further than the hose allows, or sitting in a vehicle with the nozzle in hand, also closes the purchase with its refund.

## Requirements

| Resource             | Required | Used for                                                                     |
| -------------------- | -------- | ---------------------------------------------------------------------------- |
| OneSync              | Yes      | Vehicle state and server-side checks                                         |
| `ox_lib`             | Yes      | Callbacks, notifications, locales                                            |
| `oxmysql`            | Yes      | Fuel type of each vehicle                                                    |
| `cuxial_bridge`      | Yes      | Connects to your framework (QBox, QBCore or ESX): money, jobs, inventory     |
| `sleepless_interact` | Yes      | Interactions on pumps, chargers and the fuel cap                             |
| `ox_inventory`       | Yes      | Jerry can                                                                    |
| `cuxial_gas_assets`  | Yes      | Models, screens, totems and sounds. Delivered with the script                |
| `cuxial_gasstations` | No       | Player-owned stations: own prices, stock, till, promotions and spill puddles |

{% hint style="warning" %}
Cuxial Fuel must be the only fuel resource on the server. Stop any other fuel script before starting it.
{% endhint %}

## Pages

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Installation</strong></td><td>Dependencies, other fuel scripts, convars and start order.</td><td><a href="/scripts/vehicles/cuxial-fuel/installation.md">Installation</a></td></tr><tr><td><strong>Configuration</strong></td><td>Every block of <code>shared/config.lua</code> and the lists in <code>data/</code>.</td><td><a href="/scripts/vehicles/cuxial-fuel/configuration.md">Configuration</a></td></tr><tr><td><strong>Commands &#x26; permissions</strong></td><td>Player commands, keys and the screen positioner.</td><td><a href="/scripts/vehicles/cuxial-fuel/commands.md">Commands &amp; permissions</a></td></tr><tr><td><strong>Exports &#x26; events</strong></td><td>Read and set fuel from your own resources.</td><td><a href="/scripts/vehicles/cuxial-fuel/developers.md">Exports &amp; events</a></td></tr><tr><td><strong>Troubleshooting</strong></td><td>Common problems and how to fix them.</td><td><a href="/scripts/vehicles/cuxial-fuel/troubleshooting.md">Troubleshooting</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/vehicles/cuxial-fuel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
