> 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/installation.md).

# Installation

Install Cuxial Fuel step by step: dependencies, removing other fuel scripts, convars and start order.

Cuxial Fuel needs no SQL import. It creates its own table on first start and uses an item that your inventory already has to exist: the jerry can.

{% stepper %}
{% step %}

## Check the dependencies

These resources must be installed and working before you add Cuxial Fuel:

* OneSync enabled on the server
* `ox_lib`
* `oxmysql`
* `cuxial_bridge`, with one of the supported frameworks: QBox, QBCore or ESX
* `sleepless_interact`
* `ox_inventory`
* `cuxial_gas_assets`, delivered with the script

`cuxial_gasstations` is optional. When it is running, each station sells with its own prices and stock, the money goes to its till and its promotions show on the totems. Without it, every pump sells with the prices of `defaults` in `shared/config.lua`.
{% endstep %}

{% step %}

## Copy the resources

Place the `cuxial_fuel` and `cuxial_gas_assets` folders inside your `resources` directory. Keep the folder names as they are.
{% endstep %}

{% step %}

## Remove any other fuel script

Cuxial Fuel takes the place of your previous fuel resource. Delete or comment out every line that starts another one:

{% code title="server.cfg" %}

```cfg
# ensure your_old_fuel_script
```

{% endcode %}

{% hint style="danger" %}
Two fuel systems running at once write the fuel level of the same vehicles and both react to the pumps. Leave only Cuxial Fuel.
{% endhint %}

{% hint style="info" %}
Resources that ask for fuel through the export names of the most common fuel scripts keep working. The names Cuxial Fuel answers to are the `provide` lines at the top of its `fxmanifest.lua`. See [Exports & events](/scripts/vehicles/cuxial-fuel/developers.md).
{% endhint %}
{% endstep %}

{% step %}

## Check the jerry can item

The jerry can is given as the item set in `jerryCan.item`, `weapon_petrolcan` by default. That item must exist in `ox_inventory`. If you use another name, change it in `shared/config.lua`.

No other item is needed.
{% endstep %}

{% step %}

## Set the convars

All of them are optional.

{% code title="server.cfg" %}

```cfg
# Language of the script (en and es are included)
setr ox:locale "en"

# Debug traces in the console
setr cuxial_fuel_debug "0"
```

{% endcode %}

{% hint style="info" %}
Use `setr`, not `set`: the debug convar is read on the client too.
{% endhint %}
{% endstep %}

{% step %}

## Start the resources

Start Cuxial Fuel after its dependencies and after your framework:

{% code title="server.cfg" %}

```cfg
ensure ox_lib
ensure oxmysql
# your framework here (qbx_core, qb-core or es_extended)
ensure cuxial_bridge
ensure ox_inventory
ensure sleepless_interact
ensure cuxial_gas_assets
ensure cuxial_fuel
# optional
ensure cuxial_gasstations
```

{% endcode %}

No SQL to run. The resource creates the table `cuxial_fuel_vehicles` when it starts; `install/cuxial_fuel.sql` is only a reference.

{% hint style="info" %}
If your database has a `player_vehicles_fuel_type` table from a previous fuel script and `cuxial_fuel_vehicles` is empty, the saved fuel types are copied once on start.
{% endhint %}
{% endstep %}

{% step %}

## Check that it works

1. Join the server and drive any car. Type `/fuel_type`: a notification shows the fuel of the vehicle.
2. Stop next to a pump, turn the engine off and get out. Look at the pump and pick **Refuel**. The camera moves to the pump screen.
3. Choose a fuel and an amount, and pay. The nozzle appears in your hand, tied to the pump by a hose.
4. Go to the fuel cap and pick **Refuel**. The level goes up.
5. Return to the pump and pick **Return the nozzle**. The litres you did not use are refunded.
   {% endstep %}
   {% endstepper %}

Next: adjust prices, tanks and screens in [Configuration](/scripts/vehicles/cuxial-fuel/configuration.md).


---

# 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/installation.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.
