Hello help me with this error esx_advancedgarage

Hello guys, please help me to fix garage script. There is image of error

Hi :wave: @Benas_Lepinaitis

What I understood from this is probably the lack of the desired function (SetFuel) in the LegacyFuel script.
When using a part of the script, the code tries to adjust the car’s fuel but cannot.

Please check the following:

  • The existence and startup of the LegacyFuel script.
  • The existence of the SetFuel function in the LegacyFuel script and having export from it.
LegacyFuel/fxmanifest.lua =>
    exports {
        'GetFuel',
        'SetFuel'
    }
LegacyFuel/functions/functions_client.lua =>
    function SetFuel(vehicle, fuel)
        if type(fuel) == 'number' and fuel >= 0 and fuel <= 100 then
            SetVehicleFuelLevel(vehicle, fuel + 0.0)
            DecorSetFloat(vehicle, Config.FuelDecor, GetVehicleFuelLevel(vehicle))
        end
    end

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.