Iâm having this problem on the console someone else having and can pass as I can solve.
In client.lua line 179
function(data2, menu2)
if data2.current.value == "get_vehicle_out" then
if (data.current.value.state) then
menu2.close()
Should add menu.close() so first menu closes after spawning a vehicle. Preventing the player from spawning multiple vehicles intentionally or accidentally.
function(data2, menu2)
if data2.current.value == "get_vehicle_out" then
if (data.current.value.state) then
menu.close()
menu2.close()
Great script!!
One of my players reported me a dupe bug I ll fix it on GitHub
I managed to solve my mistakes, but thanks for this incredible script. Jager_Bom
Can you help me ? i just try to spawn vehicule with the same health when we stock it i have wrote this code
server side :
RegisterServerEvent('eden_garage:gethealth')
AddEventHandler('eden_garage:gethealth', function(vehicleProps)
local vehprop = json.encode(vehicleProps)
local plate = vehicleProps.plate
local vie2 = {}
MySQL.Async.fetchAll("SELECT * FROM owned_vehicles WHERE plate=@plate",{['@plate'] = plate,}, function(data)
for _,v in pairs(data) do
vie2 = json.decode(v.health2)
TriggerClientEvent('eden_garage:gethealthtutur',to_string(vie2))
print(to_string(vie2))
end
end)
end)
client side :
RegisterNetEvent("eden_garage:gethealthtutur")
AddEventHandler("eden_garage:gethealthtutur", function(vie)
vie2 = vie
end)
i have the fonction who stock the health in the database in fiel health2 it work good but it seem that the server never trigger the client code gethealthtutur, serverside i can have print the health it work !)
could you try to help me ?
function SpawnVehicle(vehicle)
ESX.Game.SpawnVehicle(vehicle.model,{
x=this_Garage.SpawnPoint.Pos.x ,
y=this_Garage.SpawnPoint.Pos.y,
z=this_Garage.SpawnPoint.Pos.z + 1
},this_Garage.SpawnPoint.Heading, function(callback_vehicle)
ESX.Game.SetVehicleProperties(callback_vehicle, vehicle)
SetVehRadioStation(callback_vehicle, "OFF")
TaskWarpPedIntoVehicle(GetPlayerPed(-1), callback_vehicle, -1)
local playerPed = GetPlayerPed(-1)
local vehiclespawnee = GetVehiclePedIsIn(playerPed, false)
TriggerServerEvent('eden_garage:gethealth',vehicle)
SetVehicleEngineHealth(vehiclespawnee, vie2)
TriggerEvent('esx_key:getVehiclesKey',vehicle.plate)
AddVehicleKeys(callback_vehicle, vehicle)
end)
TriggerServerEvent('eden_garage:modifystate', vehicle, false)
end
and i just try to spawn with this
lol you are making youself the hard way to do it, look in es_extended client/functions.lua. over ther eyou will seeh vehicle properties. add get and set healt and nothing else to do 
here sample code
bodyHealth = GetVehicleBodyHealth(vehicle),
engineHealth = GetVehicleEngineHealth(vehicle),
fuelLevel = GetVehicleFuelLevel(vehicle),
and do the same for setvehicleâŠ
my problem is that my server script dont run the part in the client script
RegisterNetEvent("eden_garage:gethealthtutur")
AddEventHandler("eden_garage:gethealthtutur", function(vie)
vie2 = vie
end)
so i canât set vie2 in the
SetVehicleEngineHealth(vehiclespawnee, vie2)
part
did you read what i said ? you just need to put 6 lines in es_extended then all those lines in garage script
Ho OK sorry , i didnât undersand what you had say I will try it tomorow <3
how to put it for the person by the car in the garage without tar inside the car, because if it is 2 inside the car of to dupar the vehicle
donât understand
type if you have 2 players inside the vehicle when the person is going to save it to double
If thĂ© person enter the vehicle in garage the car dispawnsâŠ
So I still donât understand your issue.
If you could make a case of it so I can clearly understand hat you did and what you want
show me your table owned vehicles ?
looks ok, did you get any errors on serversided ? clientsided ? do you use esx_jb_stopvehicledespawn?
No, Iâll take a look now
this happens when you have 2 players at the time of storing the vehicle and you do not be a driver
this has been fixed in latest release





