# Vehicle fuel

{% hint style="success" %}
File Path: <kbd>modules/systems/c.vehicleFuel.lua</kbd>
{% endhint %}

***

## <mark style="color:yellow;">Pre configured scripts</mark>

* LegacyFuel
* ps-fuel
* ox\_fuel
* cd\_fuel
* custom

***

## <mark style="color:yellow;">Auto detection of resource</mark>

By default, the script will try to automatically detect the correct resource.

```lua
Shared.VehicleFuel = "AUTO DETECT"
```

***

## <mark style="color:yellow;">Auto detection failed</mark>

If auto detect failed in <kbd>config.lua</kbd>, set **Shared.VehicleFuel** to use the appropriate keys resource or set it to custom and configurate it yourself.

***

## <mark style="color:yellow;">Custom functionality</mark>

Go to <kbd>modules/systems/c.vehicleFuel.lua</kbd> and customize your fuel logic

```lua
Core.SetVehicleFuel = function(vehicle, amount)
    SetVehicleFuelLevel(vehicle, formatFuel(amount)) -- custom or default
end
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devhub.gg/scripts/devhub_lib-needed-for-each-script/vehicle-fuel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
