Custom Fuel System
function Framework.Client.VehicleGetFuel(vehicle)
if (Config.FuelSystem == "LegacyFuel" or Config.FuelSystem == "ps-fuel" or Config.FuelSystem == "lj-fuel" or Config.FuelSystem == "cdn-fuel" or Config.FuelSystem == "hyon_gas_station") then
return exports[Config.FuelSystem]:GetFuel(vehicle)
elseif Config.FuelSystem == "ox_fuel" then
return GetVehicleFuelLevel(vehicle)
else
return 65 -- or set up custom fuel system here...
end
end
function Framework.Client.VehicleSetFuel(vehicle, fuel)
if (Config.FuelSystem == "LegacyFuel" or Config.FuelSystem == "ps-fuel" or Config.FuelSystem == "lj-fuel" or Config.FuelSystem == "cdn-fuel" or Config.FuelSystem == "hyon_gas_station") then
exports[Config.FuelSystem]:SetFuel(vehicle, fuel)
elseif Config.FuelSystem == "ox_fuel" then
Entity(vehicle).state.fuel = fuel
else
-- Setup custom fuel system here
end
endLast updated
Was this helpful?