> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_housing/api/client.md).

# Client

Client-side exports exposed by `rcore_housing`. Call them from other resources running in the same client.

## 🏠 Properties

<details>

<summary>GetProperty</summary>

Returns the full property data for a given property id.

```lua
---@param propertyId number
---@return table|nil property
local property = exports.rcore_housing:GetProperty(propertyId)
```

Returns `nil` if no property exists with that id.

</details>

<details>

<summary>GetAllProperties</summary>

Returns every property currently known on the client.

```lua
---@return table properties
local properties = exports.rcore_housing:GetAllProperties()
```

</details>

## 📍 Player State

<details>

<summary>IsPlayerOnPropertyZone</summary>

Returns whether the player is currently standing in a property yard zone, along with the property id.

```lua
---@return boolean onZone
---@return number|nil propertyId
local onZone, propertyId = exports.rcore_housing:IsPlayerOnPropertyZone()
```

</details>

<details>

<summary>IsPlayerInsideProperty</summary>

Returns the id of the property the player is currently inside, plus its property data.

```lua
---@return number|nil propertyId
---@return table propertyData
local propertyId, propertyData = exports.rcore_housing:IsPlayerInsideProperty()
```

`propertyData` is an empty table (`{}`) when the player is not inside a property.

</details>

<details>

<summary>IsBuilding</summary>

Returns whether a property is a building.

```lua
---@param buildingId number
---@return boolean isBuilding
local isBuilding = exports.rcore_housing:IsBuilding(buildingId)
```

</details>

## 🗝️ Access

<details>

<summary>HasKeys</summary>

Returns whether the player has access to a property - covers ownership, tenant status, shared access, and physical key items.

```lua
---@param propertyId number
---@param doorIndex number|nil nil = master / entry access
---@return boolean hasAccess
local ok = exports.rcore_housing:HasKeys(propertyId, doorIndex)
```

</details>

## 🖥️ Menus & UI

<details>

<summary>OpenMarketplace</summary>

Opens the marketplace menu.

```lua
exports.rcore_housing:OpenMarketplace()
```

</details>

<details>

<summary>OpenFurnitureMenu</summary>

Opens the property furniture menu.

```lua
exports.rcore_housing:OpenFurnitureMenu()
```

</details>

<details>

<summary>OpenRealEstate</summary>

Opens the real estate / business menu.

```lua
exports.rcore_housing:OpenRealEstate()
```

</details>

## 🎙️ Events

<details>

<summary>playerEnteredFreecam</summary>

Triggered when a player enters freecam mode.

```lua
---@param serverId number
AddEventHandler("rcore_housing:client:playerEnteredFreecam", function(serverId)
    print("Player " .. serverId .. " entered freecam")
end)
```

**Parameters:**

* `serverId` (number) - The server ID of the player who entered freecam

</details>

<details>

<summary>playerExitFreecam</summary>

Triggered when a player exits freecam mode.

```lua
---@param serverId number
AddEventHandler("rcore_housing:client:playerExitFreecam", function(serverId)
    print("Player " .. serverId .. " exited freecam")
end)
```

**Parameters:**

* `serverId` (number) - The server ID of the player who exited freecam

</details>

{% hint style="info" %}
**vms\_housing Compatibility**

`rcore_housing` emulates vms\_housing freecam events. If you're migrating from vms\_housing, no rewrite needed — hooks work as-is.
{% endhint %}
