API
Getters
All functions can be called from export
Example:
GetVehicleFuelConsumptionEfficiency(vehicle)
GetVehicleFuelConsumptionEfficiency(vehicle)
Parameters:
vehicle: entity
Return type: float
Description: This function simply return eco-friendliness in % the less fuel consumption the more eco friendly.
GetVehicleMaxCurrentDrivingRange(vehicle)
GetVehicleMaxCurrentDrivingRange(vehicle)
Parameters:
vehicle: entity
Return type: float
Description: This function calculates and returns the current maximum driving range of the specified vehicle.
GetMaximumFuelCapacityForVehicle(vehicle)
GetMaximumFuelCapacityForVehicle(vehicle)
Parameters:
vehicle: entity
Return type: float
Description: This function returns the maximum fuel capacity of the specified vehicle in liters.
GetVehicleFuelPercentage(vehicle)
GetVehicleFuelPercentage(vehicle)
Parameters:
vehicle: entity
Return type: float
Description: This function returns the current fuel level of the vehicle as a percentage, ranging from 0.0 to 100.0.
GetVehicleFuelLiters(vehicle)
GetVehicleFuelLiters(vehicle)
Parameters:
vehicle: entity
Return type: float
Description: This function returns the current fuel level of the vehicle in liters.
Add/Remove
AddVehicleFuelLiter(vehicle, fuel)
AddVehicleFuelLiter(vehicle, fuel)
Parameters:
vehicle: entity
fuel: float
Return type: none
Description: This function adds the specified amount of fuel to the vehicle.
RemoveVehicleFuelLiter(vehicle, fuel)
RemoveVehicleFuelLiter(vehicle, fuel)
Parameters:
vehicle: entity
fuel: float
Return type: none
Description: This function removes the specified amount of fuel from the vehicle.
AddVehicleFuelPercentage(vehicle, percentage)
AddVehicleFuelPercentage(vehicle, percentage)
Parameters:
vehicle: entity
percentage: float
Return type: none
Description: This function adds the specified percentage of fuel to the vehicle's current fuel level.
RemoveVehicleFuelPercentage(vehicle, percentage)
RemoveVehicleFuelPercentage(vehicle, percentage)
Parameters:
vehicle: entity
percentage: float
Return type: none
Description: This function removes the specified percentage of fuel from the vehicle's current fuel level.
Setter
SetVehicleFuel(vehicle, percentage)
SetVehicleFuel(vehicle, percentage)
Parameters:
vehicle: entity
percentage: float
Return type: none
Description: This function sets the vehicle's fuel level to the specified percentage.
Last updated