Closed DNDdjay closed 2 years ago
Do you have t1ger_garage working?
Do you have t1ger_garage working?
kinda still have some problem with it so i have paid or a other one
Where's the code snippet where you try to get the fuel level, though? And please, do everyone a favor and use code blocks in the future for when posting code somewhere.
print("This is far more readable!")
try this, its is working for me
RegisterNetEvent("fuel:setFuel") AddEventHandler("fuel:setFuel",function(veh,fuel) SetFuel(veh,fuel) end)
in the client file
I am the script author, I wasn't asking for help. It seems you figured out your issue, so will close this. You also completely ignored my code block suggestion... :/
sorry did not see that
hii i am trying to get the save fuel from the garage on to the car but the export dont work
function SpawnSelectedVeh(vehicle, val) ESX.Game.SpawnVehicle(vehicle.vehicle.model,{x = val.pos[1], y = val.pos[2], z = val.pos[3] + 1}, val.pos[4], function(car) ESX.Game.SetVehicleProperties(car, vehicle.vehicle) SetVehRadioStation(car, "OFF") TaskWarpPedIntoVehicle(player, car, -1) local carPlate = GetVehicleNumberPlateText(car):gsub("^%s(.-)%s$", "%1") local vehicle = CreateVehicle(modelHash, coords.x, coords.y, coords.z, true, false) --TriggerServerEvent("ls:mainCheck", carPlate, car, true) -- IDK what this is used for, but I've seen it in many other garage scripts - use or don't. if val.label == "police" then TriggerServerEvent('t1ger_garage:updateSeizedVehicle', carPlate, false) else TriggerServerEvent('t1ger_garage:updateVehicleState', carPlate, false) end ESX.TriggerServerCallback('t1ger_garage:getVehicleFuel', function(vehFuel) if vehFuel ~= nil then if Config.HasFuelEvent then exports['LegacyFuel']:SetFuel(vehicle) else SetVehicleFuelLevel(car, vehFuel + 0.0) end else SetVehicleFuelLevel(car, 50.0) end end, carPlate) end) end