# 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!


---

# 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://janiel.gitbook.io/janiel-resources/janiel-docs/fuelstations/installation.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.
