[RE-RELEASE] esx_eden garage



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 :

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)


client side :

AddEventHandler("eden_garage:gethealthtutur", function(vie)
	vie2 = vie

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)
		x=this_Garage.SpawnPoint.Pos.x ,
		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)
		SetVehicleEngineHealth(vehiclespawnee, vie2)
		AddVehicleKeys(callback_vehicle, vehicle)

	TriggerServerEvent('eden_garage:modifystate', vehicle, false)


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 :slight_smile:

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

AddEventHandler("eden_garage:gethealthtutur", function(vie)
	vie2 = vie

so i can’t set vie2 in the

SetVehicleEngineHealth(vehiclespawnee, vie2)



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


if I have another person as the driver of my car I keep the car but it will not disappear.


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


I tested it yesterday and it’s still doubling when 2 people are in the vehicle at the same time and the owner of the vehicle is not driving


how to put away the damaged vehicle