ps-housing

ps-housing integration for qbcore/qbox servers.

1

Find function Property:RegisterGarageZone and replace it with this:

function Property:RegisterGarageZone()
    if not next(self.propertyData.garage_data) then return end

    if not (self.has_access or self.owner) or not self.owner then
        return
    end

    local garageData = self.propertyData.garage_data
    local label = self.propertyData.street .. self.property_id .. " Garage"
    local playerData = QBCore.Functions.GetPlayerData()

    local Coords = {
        CenterOfZone = vec4(garageData.x, garageData.y, garageData.z, garageData.h),
        AccessPoint = vec4(0.0, 0.0, 0.0, 0.0) 
    }
    local PrivatePlayersList = {
        {
            id = playerData.citizenid,
            name = ""
        }
    }
    self.garageZone = exports['op-garages']:ClientaddTempPrivateGarage(label, "car", Coords, garageData.length, PrivatePlayersList)
end
2

In the same file find function Property:UnregisterGarageZone

And Replace it with:

function Property:UnregisterGarageZone()
    if not self.garageZone then return end

    exports['op-garages']:ClientremoveTempPrivateGarage(self.garageZone)
    self.garageZone = nil
end
3

Restart Server.

And make sure your op-garages version is higher than 2.0.7

Last updated