# Change fuel type for vehicle

### Location

This configuration is located in `rcore_fuel/config/fuel_config.lua`.

### Vehicle Fuel Type Configuration

The configuration is managed within the `Config.VehicleFuelType` array.

### Structure

The array structure consists of:

* `model`: The spawn model of the vehicle.
* `fuelType` The fuel type for the specific model.

Example of a new entry:

{% code overflow="wrap" lineNumbers="true" %}

```lua
{
    model = "myCar",
    fuelType = FuelType.NATURAL,
}
```

{% endcode %}

To find all types for the `FuelType` array, refer to the file located at `rcore_fuel/const.lua`. Look for the following array:

{% code overflow="wrap" lineNumbers="true" %}

```lua
FuelType = {
    NATURAL = 1,
    DIESEL = 2,
    EV = 3,
    LPG = 4,
    CNG = 5,
    MILK = 6,
    AVIATION = 7,
}
```

{% endcode %}

### Example of the "VehicleFuelType"

{% code overflow="wrap" lineNumbers="true" %}

```lua
Config.VehicleFuelType = {
    -- entry 1
    {
        model = "tesla",
        fuelType = FuelType.EV,
    },
    -- entry 2
    {
        model = "phantom3",
        fuelType = FuelType.DIESEL,
    },
    -- entry 3
    {
        model = "pavel",
        fuelType = FuelType.MILK,
    },
}
```

{% endcode %}

There is also the possibility to configure the fuel type for a specific vehicle class in the same config file mentioned above by using `Config.SpecificFuelTypePerVehicleClass`.

{% code overflow="wrap" lineNumbers="true" %}

```lua
Config.SpecificFuelTypePerVehicleClass = {
    [0] = { FuelType.DIESEL, FuelType.NATURAL }, -- Compacts
}
```

{% endcode %}

This will enforce either diesel or natural gas as the fuel type for the "compacts" class. If you wish to enforce only one specific fuel type, it can be done as follows:

{% code overflow="wrap" lineNumbers="true" %}

```lua
Config.SpecificFuelTypePerVehicleClass = {
    [0] = { FuelType.NATURAL }, -- Compacts
}
```

{% endcode %}

Now, all compacts will run only on natural gas.


---

# 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://documentation.rcore.cz/paid-resources/rcore_fuel/config/custom_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.
