Exports
Server Exports
GetProperty
Retrieves property data by its ID.
local property = exports['RxHousing']:GetProperty(propertyId)
The unique identifier of the property.
GetAllProperties
Returns all properties in the system.
local properties = exports['RxHousing']:GetAllProperties()
GetOwnedProperties
Gets all properties owned by a specific identifier.
local ownedProperties = exports['RxHousing']:GetOwnedProperties(identifier)
The player's identifier.
GetPropertyByLabel
Finds a property by its label/name.
local property = exports['RxHousing']:GetPropertyByLabel(label)
The property's label.
AddKeyholder
Adds a keyholder to a property.
local success = exports['RxHousing']:AddKeyholder(propertyId, identifier)
The property ID.
The identifier of the player to add as keyholder.
RemoveKeyholder
Removes a keyholder from a property.
local success = exports['RxHousing']:RemoveKeyholder(propertyId, identifier)
The property ID.
The identifier of the keyholder to remove.
HasKey
Checks if a player has access to a property.
local hasAccess = exports['RxHousing']:HasKey(propertyId, identifier)
The property ID.
The player's identifier.
TransferProperty
Transfers property ownership to another player.
local success = exports['RxHousing']:TransferProperty(propertyId, newOwner)
The property ID.
The identifier of the new owner.
SetPropertyPrice
Updates the price of a property.
local success = exports['RxHousing']:SetPropertyPrice(propertyId, newPrice)
The property ID.
The new price for the property.
DeleteProperty
Deletes a property from the system.
local success = exports['RxHousing']:DeleteProperty(propertyId)
The property ID to delete.
GetPropertyKeyholders
Gets all keyholders for a property.
local keyholders = exports['RxHousing']:GetPropertyKeyholders(propertyId)
The property ID.
GetPropertyFurniture
Gets all furniture in a property.
local furniture = exports['RxHousing']:GetPropertyFurniture(propertyId)
The property ID.
SetPropertyForSale
Sets a property for sale or removes it from sale.
local success = exports['RxHousing']:SetPropertyForSale(propertyId, forSale, price)
The property ID.
Whether the property should be for sale.
Optional new price when setting for sale.
GetPlayersInProperty
Gets all players currently inside a property.
local players = exports['RxHousing']:GetPlayersInProperty(propertyId)
The property ID.
ForcePlayerExit
Forces a player to exit their current property.
local success = exports['RxHousing']:ForcePlayerExit(source)
The player's server ID.
Client Exports
OpenPropertyDoorMenu
Opens the property door menu for a specific property. Useful for custom door lock systems.
local success = exports['RxHousing']:OpenPropertyDoorMenu(propertyId)
The property ID to open the door menu for.
OpenFurnitureMenu
Opens the furniture menu for the player.
local success = exports['RxHousing']:OpenFurnitureMenu(propertyId)
Optional property ID, if not given it will open for the current property the player is in/at.
