Modify your vehicles however you want. From top to bottom.
Full Changelog: https://github.com/Mergevos/open-vehicle-plus/compare/1.4.0...2.0.0
Welcome compat call, say goodbye to adapting all the default functions to new api. Simply define VEHICLE_PLUS_COMPAT before including this library, as well as SA:MP style functions naming, take a look at: https://github.com/Mergevos/open-vehicle-plus/blob/master/vehicle_plus.inc#L4611-L4706
What's new
Fuel system has implemented. In order for it to function, you've to explicitly set fuel capacity, otherwise it will be equal to -1 (infinite fuel)
Vehicle_SetFuelTankCapacity
- Sets tank capacity (-1 infinite fuel)Vehicle_SetFuelLevel
- Sets fuel levelVehicle_SetFuelConsumption
- Sets fuel consumption rateVehicle_GetFuelTankCapacity
- Gets fuel tank capacityVehicle_GetFuelLevel
- Gets fuel levelVehicle_GetFuelConsumption
- Gets fuel consumption ratesVehicle_GetDistanceCanPass
- Gets distance vehicle can pass coresponding to fuel levelVehicle_GetDistanceFromLastRefill
- Gets distance from last fuel refill.Vehicle_TryTurningEngine
- Checks if vehicle has fuel in order to start. (will have more checks in future)All of these functions have unit
argument which determine what unit of measure function will use.
It's either VEHICLE_UNIT_IMPERIAL
or VEHICLE_UNIT_METRIC
.
Full Changelog: https://github.com/Mergevos/open-vehicle-plus/compare/1.3.1...1.3.2
Special thanks to @iamjexcdevvv
Since last release yesterday, I enountered misimplementation of driven distance checking, so it's fixed now, along with not-setting distance for opposite unit.
OnVehicleDrivenDistanceUpdate
is now being called only when vehicle travels, not every second as it had been used to before.Vehicle_SetDistanceTravelled
now sets distance for opposite unit too.Vehicle_GetNumberPlate
now returns INVALID_VEHICLE_ID
if vehicle is invalid, otherwise it obtains number plate text.Vehicle_SetNumberPlate
is now tagged with bool
, returns false if vehicle is invalid, otherwise true.OnVehicleDrivenDistanceUpdate
called every second.unit
argument.