For the complete documentation index, see llms.txt. This page is also available as Markdown.

Client

List of available getters and setters in rcore_fuel.

Getters

GetVehicleFuelConsumptionEfficiency
---@param vehicle entity
---@return float
GetVehicleFuelConsumptionEfficiency(vehicle)
  • This function simply return eco-friendliness in % the less fuel consumption the more eco friendly.

GetVehicleMaxCurrentDrivingRange
---@param vehicle entity
---@return float
GetVehicleMaxCurrentDrivingRange(vehicle)
  • This function calculates and returns the current maximum driving range of the specified vehicle.

GetMaximumFuelCapacityForVehicle
---@param vehicle entity
---@return float
GetMaximumFuelCapacityForVehicle(vehicle)
  • This function returns the maximum fuel capacity of the specified vehicle in liters.

GetVehicleFuelPercentage
---@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.

GetVehicleFuelLiters
---@param vehicle entity
---@return float
GetVehicleFuelLiters(vehicle)
  • This function returns the current fuel level of the vehicle in liters.


Add

AddVehicleFuelLiter
  • This function adds the specified amount of fuel to the vehicle.

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

Remove

RemoveVehicleFuelLiter
  • This function removes the specified amount of fuel from the vehicle.

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

Setters

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

All functions can be called from export

  • Example:

Last updated