if Config.HouseScript ~= "esx_property" then return end RegisterNuiCallback("gksphone:home:fetchHouseData", function(data, cb) local properties = exports["esx_property"]:GetProperties() local identifier = PlayerData.identifier local out = {} if type(properties) == 'table' then for i = 1, #properties do local property = properties[i] local owned = property.Owned and property.Owner == identifier local keyed = property.Keys and property.Keys[identifier] ~= nil if owned or keyed then local coords = property.Entering or property.Position or property.Coords out[#out + 1] = HouseEntry({ id = i, label = property.Name or property.Label, owned = owned and true or false, price = property.Price, keyholders = owned and HouseKeys(property.Keys, function(id, value) local name = type(value) == 'table' and (value.name or value.charname) or nil return HouseKey(id, name) end) or {}, coords = coords, canLocate = type(coords) == 'table' and coords.x ~= nil, canTransfer = false }) end end end Debugprint('esx_property houses', out) cb(out) end) RegisterNUICallback('gksphone:home:transferHouse', function(data, cb) cb(false) end) RegisterNUICallback('gksphone:home:houseLocation', function(data, cb) if not HouseWaypoint(data.coords) then exports["gksphone"]:ToastNotification( _T(LastItemData?.info?.phoneLang, "HouseAPP.APP_HOUSE_ERROR_NOTFOUND")) cb(false) return end exports["gksphone"]:ToastNotification( _T(LastItemData?.info?.phoneLang, "HouseAPP.APP_HOUSE_SETGPS")) cb('ok') end) RegisterNUICallback('gksphone:home:giveKey', function(data, cb) cb(false) end) RegisterNUICallback('gksphone:home:removeKey', function(data, cb) cb(false) end) RegisterNUICallback('gksphone:home:toggleLock', function(data, cb) cb(false) end)