> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_fuel/api/client.md).

# Client

### Getters

<details>

<summary>GetVehicleFuelConsumptionEfficiency</summary>

```lua
---@param vehicle entity
---@return float
GetVehicleFuelConsumptionEfficiency(vehicle)
```

* This function simply return eco-friendliness in % the less fuel consumption the more eco friendly.

</details>

<details>

<summary>GetVehicleMaxCurrentDrivingRange</summary>

```lua
---@param vehicle entity
---@return float
GetVehicleMaxCurrentDrivingRange(vehicle)
```

* This function calculates and returns the current maximum driving range of the specified vehicle.

</details>

<details>

<summary>GetMaximumFuelCapacityForVehicle</summary>

```lua
---@param vehicle entity
---@return float
GetMaximumFuelCapacityForVehicle(vehicle)
```

* This function returns the maximum fuel capacity of the specified vehicle in liters.

</details>

<details>

<summary>GetVehicleFuelPercentage</summary>

```lua
---@param vehicle entity
---@return float
GetVehicleFuelPercentage(vehicle)
```

* This function returns the current fuel level of the vehicle as a percentage, ranging from 0.0 to 100.0.

</details>

<details>

<summary>GetVehicleFuelLiters</summary>

```lua
---@param vehicle entity
---@return float
GetVehicleFuelLiters(vehicle)
```

* This function returns the current fuel level of the vehicle in liters.

</details>

***

### Add

<details>

<summary>AddVehicleFuelLiter</summary>

```lua
---@param vehicle entity
---@param fuel float
---@return none
AddVehicleFuelLiter(vehicle, fuel)
```

* This function adds the specified amount of fuel to the vehicle.

</details>

<details>

<summary>AddVehicleFuelPercentage</summary>

```lua
---@param vehicle entity
---@param percentage float
---@return none
AddVehicleFuelPercentage(vehicle, percentage)
```

* This function adds the specified percentage of fuel to the vehicle's current fuel level.

</details>

### Remove

<details>

<summary>RemoveVehicleFuelLiter</summary>

```lua
---@param vehicle entity
---@param fuel float
---@return none
RemoveVehicleFuelLiter(vehicle, fuel)
```

* This function removes the specified amount of fuel from the vehicle.

</details>

<details>

<summary>RemoveVehicleFuelPercentage</summary>

```lua
---@param vehicle entity
---@param percentage float
---@return none
RemoveVehicleFuelPercentage(vehicle, percentage)
```

* This function removes the specified percentage of fuel from the vehicle's current fuel level.

</details>

### Setters

<details>

<summary>SetVehicleFuel</summary>

```lua
---@param vehicle entity
---@param percentage float
---@return none
SetVehicleFuel(vehicle, percentage)
```

* This function sets the vehicle's fuel level to the specified percentage.

</details>

All functions can be called from export

* Example:

```lua
	CreateThread(function()
	    local ped = PlayerPedId()
	    local veh = GetVehiclePedIsIn(ped, false)
	
	    local currentFuelLiters = exports["rcore_fuel"]:GetVehicleFuelLiters(veh)
	    local maxFuelLiters = exports["rcore_fuel"]:GetMaximumFuelCapacityForVehicle(veh)
	    
	    print(string.format("Current Fuel: %2.f | Max F: %2.f",  currentFuelLiters, maxFuelLiters))
	end)
	
```
