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 77 forks source link

Fuelcan durability/ammo deduction #11

Closed StuxxyOfficial closed 2 years ago

StuxxyOfficial commented 2 years ago

Finds inventory slot of WEAPON_PETROLCAN in players hand then deducts durability based on amount of fuel put into vehicle. also added logic for cancelling fueling if durability hits 0.

MJRamon commented 2 years ago

After finishing refuel with fuelcan all actions and prompts stop working - with vehicle and with stations. Restarting resource brings them back. No errors server or client side.

And yes, 'pump' changed to 1, 'can' to 2 and ox.refillValue to Config.refillValue

MJRamon commented 2 years ago

Okey, after intense debugging I found an error. Add local candeduction = 0 after local nearestPump and change local candeduction = 0 in first loop to candeduction = 0

StuxxyOfficial commented 2 years ago

Okey, after intense debugging I found an error. Add local candeduction = 0 after local nearestPump and change local candeduction = 0 in first loop to candeduction = 0

I'm not sure how that fixes anything, that variable doesn't need to be global, its only referenced inside that function.

LukeWasTakenn commented 2 years ago

Implemented in some way, shape and form in https://github.com/overextended/ox_fuel/commit/6c7d670383f67c6251e73c0f625ef010ddcc97f5.