#Integration with es_garage

4 messages · Page 1 of 1 (latest)

raven obsidian
#

I tried to use the export code on your docs but don't work

config file

Customize.GetVehFuel = function(Veh)
return GetVehicleFuelLevel(Veh)-- exports["LegacyFuel"]:GetFuel(Veh)
end

i tried to change like this

function StoreVehicleInGarage(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
local fuelLevel = exports["lc_fuel"]:GetFuel(vehicle)

TriggerServerEvent('vehiclesStored', plate, fuelLevel)

end

Customize.SetVehFuel = function(Veh, Fuel)
return GetVehicleFuelLevel(Veh) -- exports['LegacyFuel']:SetFuel(Veh, data.Table.fuel)
end

function SpawnVehicle(modelHash, fuel)
local vehicle = CreateVehicle(modelHash, coords.x, coords.y, coords.z, true, false)

exports["lc_fuel"]:SetFuel(vehicle, fuel)

end

client file

local fuel = Customize.GetVehFuel(currentVeh)

i change like this

local fuelLevel = exports["lc_fuel"]:GetFuel(vehicle)

Customize.SetVehFuel(Veh, data.fuel)
SetVehicleFuelLevel(veh, 100.0)

i don't know how to put

stark dragonBOT
#

@raven obsidian, while you wait, make sure to read our docs https://docs.lixeirocharmoso.com/ for install steps, common issues and exports usage.

🔧 Support Guidelines 🔧

  1. Show Your Troubleshooting Efforts: Explain what you tried to fix the issue. Actively participate in the solution-finding process. Don't just expect others to fix the code for you.
  2. Describe Your Issue Clearly: Provide a step-by-step explanation of the problem. A video showing the issue greatly helps!
  3. Give More Context: The more details you provide, the higher the chance of receiving a helpful response.
  4. Post the Full Error Message: Open F8 or your server console and search for any errors.
  5. Share Your Script Version: Run lc_version in your server console and attach a screenshot.
  6. Issue Solved? Click the button below to mark this thread as solved and close it.
north reef
#

All you need is change from this
exports["LegacyFuel"]:GetFuel

to this
exports["lc_fuel"]:GetFuel

#

Just change the script name, nothing else