Closed DonKKijotE closed 4 years ago
Sorry guys, I was investigating and it apparently is a LegacyFuel issue, I'm really sorry for opening this ticket. Please feel free to delete it and once again greate job!
yes indeed, legcy fuel issue. You need to sync legacy with when getting out the car
Hello guys,
I'm trying to get esx_jb_eden_garage2 working with LegacyFuel. The issue I'm having is that when I store the vehicle in the garage it gets stored with a new random fuelLevel amount. To get to this error I do the following:
I get the car out of the garage, I check in the database and the car status is changed to 0 and the fuelLevel is X. Then store it again and a random fuelLevel amount is stored.
I checked my es_extended/client/functions.lua to see ESX.Game.GetVehicleProperties and it has:
fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1),
Then ESX.Game.SetVehicleProperties has
if props.fuelLevel then SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0) end
I am assuming the code before is OK since it does store the fuel levels along the other vehicle properties.
I check esx_jb_eden_garage2 to see where the cars get stored and see this:
It also looks good since it's based on GetVehicleProperties(vehicle), so I see maybe eden_garage:stockv could be problematic?
I looked at the eden_garage:stockv and saw this:
It doesn't seem problematic to me but the fact is that I don't know why everytime I store the car the fuelLevel gets randomised.
Does anyone know why this might be happening? I don't think it has to do with LegacyFuel but I will also look that code.
Any help will much be appreciated, thanks and good job with eden_garage_2 :)