qbcore-framework / qb-garages

Garage System Used With QB-Core :car:
GNU General Public License v3.0
48 stars 260 forks source link

[BUG] RANDOM FUEL VALUE WHEN TAKING OUT THE VEHICLE #339

Closed C4RM3L0-TH1NG5 closed 9 months ago

C4RM3L0-TH1NG5 commented 10 months ago

Describe the bug I noticed that the fuel value is being randomised while taking out the vehicle from the garage or depot.

To Reproduce

  1. Store in the garage (It is working fine and it saves the fuel value correctly in the DB)
  2. Take out the vehicle
  3. Fuel value will be randomised because the value of fuel is NIL

Expected behavior

  1. Store in the garage
  2. Take out the vehicle
  3. Get the same fuel value when stored

Additional context The error is in "qb-garages:client:takeOutGarage". I fixed the problem by changing > "exports[Config.FuelResource]:SetFuel(veh, data.vehicle.fuel)" To this > "exports[Config.FuelResource]:SetFuel(veh, data.stats.fuel)"

Svenhr commented 9 months ago

I added fix here look at the end of coments here https://github.com/qbcore-framework/qb-garages/issues/329#issuecomment-1884116813

C4RM3L0-TH1NG5 commented 9 months ago

Oh great, I didn't pay attention to that. It took 3 hours nearly to figure it out.

GhzGarage commented 9 months ago

https://github.com/qbcore-framework/qb-garages/commit/fcdbf5752a4d7e31f3c271912925829cce00e59b