1
0
Fork 0
forked from Simnation/Main

resources/[jobs]/[civ]/mh_jobgarage/server/server.lua aktualisiert

This commit is contained in:
Miho 2025-06-24 22:33:18 +02:00
parent 9a9bed20d9
commit 454604e023

View file

@ -242,7 +242,12 @@ QBCore.Functions.CreateCallback('mh_jobgarage:CallOwnerVehicles', function(sourc
if rs ~= nil and rs[1] ~= nil then
for k, v in pairs(rs) do
MySQL.query("SELECT count FROM vehicle_keys WHERE owner = ? AND plate = ?", {pedid, v.plate}, function(keycount)
table.insert(veh, {plate = v.plate, keys = keycount[1].count or 0})
print(json.encode(keycount))
if keycount and keycount[1] then
table.insert(veh, {plate = v.plate, keys = keycount[1].count})
else
table.insert(veh, {plate = v.plate, keys = 0})
end
end)
end
cb(veh)