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

# INSTALLATION

📌 Requirements QB-Core or ESX Framework ox\_lib&#x20;

#### 1. Resource Installation

1. Download the latest release
2. Extract to your resources folder
3. Add `ensure janiel-fuelstations` to your server.cfg
4. Configure config.lua to your preferences

**2.Attention! Correct Export Usage for Your Fuel System**

To ensure seamless integration with your existing fuel system, you must use the following export:

```
exports["janiel-fuelstations"]
```

Please use the export above instead of other fuel scripts. Using incorrect code may cause your system to malfunction.

3. #### Exports

   There are currently two (client-sided) exports available, which should help you control the fuel level for vehicles whenever needed.

```
SetFuel(vehicle --[[ Vehicle ]], value --[[ Number: (0-100) ]])
GetFuel(vehicle --[[ Vehicle ]]) -- Returns the vehicle's fuel level.
```

4. **Example usage:**

```
function SpawnVehicle(modelHash)
    local vehicle = CreateVehicle(modelHash, coords.x, coords.y, coords.z, true, false)

    exports["janiel-fuelstations"]:SetFuel(vehicle, 100)
end

function StoreVehicleInGarage(vehicle)
    local plate = GetVehicleNumberPlateText(vehicle)
    local fuelLevel = exports["janiel-fuelstations"]:GetFuel(vehicle)

    TriggerServerEvent('vehiclesStored', plate, fuelLevel)
end
```

If you encounter any issues, feel free to contact our support team.

Thank you!
