overextended / ox_fuel

Simplistic fuel resource meant for use with ox_inventory
https://overextended.dev/ox_fuel
GNU General Public License v3.0
60 stars 78 forks source link

ox_fuel - "No progress bar is active" error #98

Open nggcasey opened 1 month ago

nggcasey commented 1 month ago

If you have enough money to start refuelling but not enough to get you to the next fuel tick, you get a "No progress bar is active" error.

oxfuel/config.lua

    -- Fuel tick time (every 250 msec)
    refillTick = 250,

    -- Fuel cost (Added once every tick)
    priceTick = 5,

If I have $5, I can start refueling...but it will give me this error. If I have more than $10, I'm fine. image

Possible solution:

Add a check to see if the progressbar is active

Current

ox_fuel/client/fuel.lua: Line 106

if price + config.priceTick >= moneyAmount then

Modified

ox_fuel/client/fuel.lua: Line 106

if price + config.priceTick >= moneyAmount and lib.progressActive() then

Seems to work alright so far.