How might I have it so every garage shows your cars location i.e. like the impound and police impound already do, but for every garage so if a player checks garage A it will show all vehicles and the garage name they are in?
@ Rostus Check to make sure your SQL is setup properly.
I just have a small issue, Iāve parked 3 of my vehicles in different garages. Not a single one worked, when I try to retrieve it in the menu it says ācar depotā . I click it, then it says that itās not parked, should be in impound. I went to the impound but there it says that I donāt have any impounded cars.
Iām using esx v1final. Hopefully thereās a fix.
Hello guys, i really want to use this garage because its perfect!
We have 1 problem with parking out our vehicles.
After parking in an car, in database stored is correctly set to ā1ā and āgarageā table too.
But when i want to park out my car, he says its in āCar depotā but there is nothing.
I think the problem is in this little code, but i cant see the issue.
Anyone can help me out, so i can get this garage working?
openGarageMenu = function(garage)
local elements = {}
ESX.TriggerServerCallback("esx_simplegarages:callback:GetUserVehicles", function(myCars)
for k, v in pairs(myCars) do
local aheadVehName = GetDisplayNameFromVehicleModel(v.vehicle.model)
local vehicleName = GetLabelText(aheadVehName)
local labelvehicle
local labelvehicle2 = ('%s (%s) - '):format(vehicleName, v.plate)
local labelvehicle3 = ('%s (%s) - '):format(vehicleName, v.plate)
if v.stored == 1 then
labelvehicle = labelvehicle2 .. ('<span style="color:#2ecc71;">%s</span>'):format('In garage')
elseif v.stored == 2 then
labelvehicle = labelvehicle2 .. ('<span style="color:#c0392b;">%s</span>'):format('Impounded')
else
labelvehicle = labelvehicle2 .. ('<span style="color:#e67e22;">%s</span>'):format('Car depot')
end
table.insert(elements, {label = labelvehicle, value = v})
end
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'spawn_owned_car', {
title = garage,
align = left,
elements = elements
}, function(data, menu)
if data.current.value == nil then
else
if data.current.value.stored == 1 then
menu.close()
spawnVehicle(data.current.value.vehicle, data.current.value.fuel, data.current.value.engine, data.current.value.plate)
else
ESX.ShowNotification("This vehicle isn't parked, its probably in the impound.")
end
end
end, function(data, menu)
menu.close()
end)
end, garage)
end
has anyone seen the issue when you leave the server the garage marker to pull your car out is no longer there? if i restart the script the marker shows again but everytime someone leaves and joins back the marker isnt there.