Skip to content

Commit

Permalink
Add support for AK47 Garages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan2139 committed Jun 12, 2024
1 parent 0e020be commit b2ed727
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions sonorancms/server/pushEvents.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2164,6 +2164,41 @@ local function requestGarageData()
else
TriggerEvent('SonoranCMS::core:writeLog', 'error', 'Error getting garage data from jg-advancedgarages, the export getAllGarages() is not available. Please update your jg-advancedgarages resource.')
end
elseif GetResourceState('ak47_qb_garage') == 'started' then
local sqlData = MySQL.query('SELECT * FROM `ak47_qb_garage', function(row)
if not row then
TriggerEvent('SonoranCMS::core:writeLog', 'debug', 'No garages found in ak47_qb_garage')
else
for _, v in ipairs(row) do
local spawns = json.decode(v.spawns)
table.insert(QBGarages, {
name = v.gid,
label = v.name,
takeVehicle = {
spawns[1].x,
spawns[1].y,
spawns[1].z
},
spawnPoint = {
spawns[1].x,
spawns[1].y,
spawns[1].z,
},
putVehicle = {
spawns[1].x,
spawns[1].y,
spawns[1].z
},
showBlip = true,
blipName = v.name,
blipNumber = 357,
blipColor = 3,
type = 'public',
vehicle = 'car'
})
end
end
end)
end
return QBGarages
end
Expand Down

0 comments on commit b2ed727

Please sign in to comment.