# ps-housing

{% stepper %}
{% step %}

### Navigate to ps-housing/client/cl\_property.lua

Find `function Property:RegisterGarageZone` and replace it with this:

```lua
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

```

{% endstep %}

{% step %}

### In the same file find `function Property:UnregisterGarageZone`

And Replace it with:

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

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

{% endstep %}

{% step %}

### Restart Server.

And make sure your op-garages version is higher than 2.0.7
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherplanet.dev/scripts/op-garages-v2/script-integrations/ps-housing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
