2025-04-05 22:25:06 +00:00

15 lines
399 B
Lua

local QBCore = exports['qb-core']:GetCoreObject()
QBCore.Functions.CreateCallback('qb-spawn:server:getOwnedHouses', function(_, cb, cid)
if cid ~= nil then
local houses = MySQL.query.await('SELECT * FROM player_houses WHERE citizenid = ?', { cid })
if houses[1] ~= nil then
cb(houses)
else
cb({})
end
else
cb({})
end
end)