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

# Fuel

Fuel level for Striga Tokyo HUD. Common fuel scripts work out of the box.

Config keys: `fuel.adapter` (default `"auto"`) and `fuel.resources` in `config.json`. Client only.

## Built-in reader

With `"adapter": "auto"`, core uses its built-in reader. It looks for the scripts in `fuel.resources`, in order. The **first one that runs** wins:

```json
"fuel": {
    "adapter": "auto",
    "resources": ["ox_fuel", "LegacyFuel", "cdn-fuel", "ps-fuel", "qb-fuel", "lc_fuel"]
}
```

* `ox_fuel`: read from the vehicle state bag.
* The others: read with their `GetFuel(vehicle)` export.
* None running: the game's own fuel level is used.

{% hint style="success" %}
**Another fuel script?** If it has a `GetFuel(vehicle)` export, just add its resource name to `fuel.resources` (put it first if you run more than one). Then restart striga-core and your Striga scripts.
{% endhint %}

## Your own fuel adapter

For a fuel script without `GetFuel(vehicle)`:

```json
"fuel": { "adapter": "my-fuel", "resources": [] }
```

Required: `getFuel(vehicle)`, returns 0 to 100.

```lua
local function register()
    exports['striga-core']:RegisterAdapter('fuel', 'my-fuel', {
        getFuel = function(vehicle) return exports['my-fuel']:GetFuel(vehicle) end,
    })
end
register()
AddEventHandler('onClientResourceStart', function(res) if res == 'striga-core' then register() end end)
```

{% content-ref url="/pages/gZUPaGkn6LQKWIpUBTjC" %}
[Settings Hub & Theme](/docs/striga-core/settings-hub-and-theme.md)
{% endcontent-ref %}


---

# 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://striga.gitbook.io/docs/striga-core/integration/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.
