Commands & Exports
This section lists all available commands, exports, and events included in the script. You’ll find client-side, server-side, and shared functions designed to help developers integrate, extend, or interact with the system easily within their own scripts or frameworks.
Commands
This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.
/houseMenu
Open your home menu to manage furniture, storage, and settings.
/hireRenter
Admin only — remove a tenant from the property.
/realestate
Open the real estate menu to manage and view available properties.
/resetentrycoords
Reset all interior door coordinates to their default positions.
/housingfurniture
Open the in-game furniture creator
Client Exports
This section provides all available client exports for the script. These functions allow you to interact directly with the system from the client side, enabling custom features, UI interactions, and integrations with other resources. Each export includes a short description and usage example for easy implementation.
inDecorate
The inDecorate export allows you to check if a player is currently in decoration mode. This is useful for managing or restricting specific actions while decoration mode is active.
How to Use
To check whether the player is in decoration mode, use the following code:
local inDecorate = exports['qs-housing']:inDecorate()
print("Is the player in decoration mode? " .. tostring(inDecorate))This will return a boolean value (true or false) indicating whether the player is in decoration mode. You can then use this information to implement custom logic, such as blocking certain actions or triggering events during decoration.
GetClosestHouse
The GetClosestHouse export allows you to determine whether the player is near a house. This can be useful for triggering house-related interactions or verifying proximity for specific actions.
How to Use
To check if a player is near a house, use the following code:
local closestHouse = exports['qs-housing']:GetClosestHouse()
if closestHouse then
print("Closest house identifier: " .. closestHouse)
else
print("No house nearby.")
endThis will return the identifier of the closest house if one is nearby or nil if no house is detected. You can use this information to execute house-specific logic or display relevant information to the player.
getCurrentHouse
The getCurrentHouse export allows you to retrieve the identifier of the house the player is currently inside. This is useful for managing house-specific features, such as editing or interacting with the house's interior.
How to Use
To get the current house the player is in, you can use the following code:
This export will return the identifier of the current house if the player is inside one, or nil if the player is not in any house. You can utilize this for custom scripts or house-related actions.
getHouseList
The getHouseList export allows you to retrieve the full list of houses defined in the configuration file (Config.Houses). This is particularly useful if you need to access or manipulate the house data programmatically within your scripts.
How to Use
To get the complete list of houses, you can use the following code:
This export will return a table containing all the houses configured in your asset. Each house entry will include details such as its ID, location, and any other custom configurations defined in Config.Houses. You can use this data for tasks like listing available houses, debugging, or creating custom features.
GetCurrentHouseUpgrades
The GetCurrentHouseUpgrades export allows you to retrieve the list of upgrades for the house you are currently inside. This is useful for accessing and managing the specific upgrades applied to a house.
How to Use
To get the list of upgrades for the current house, you can use the following code:
This export will return a table containing the upgrades for the current house. If no upgrades exist or you are not inside a house, it will return an empty table. You can use this data to display, modify, or manage house upgrades programmatically.
enterHouse
The enterHouse export allows you to programmatically force the local player to enter a specific house. This can be used in scripts to trigger entry into properties either as a regular access or as a visitor.
How to Use
To make the player enter a specific house, use the following code:
houseId(string): The unique identifier of the house you want the player to enter. This must match an existing house defined in yourConfig.Houses.isVisit(boolean): Set totrueif the entry should be treated as a visit (guest mode), orfalsefor a normal entry (owner or authorized access).
initCurrentDecorations
The initCurrentDecorations client export fully reinitializes house decorations by fetching fresh data from the server and spawning everything again. This is a heavy operation and should only be used when a full resync is required.
How to Use
This will request decoration data from the server and recreate all decoration objects from scratch.
Server Exports
This section provides all available server exports for the script. These functions allow developers to interact with the system from the server side, manage data, trigger actions, and integrate with other resources. Each export includes a clear description and a practical example to simplify its implementation.
getHouseRoutingId
The getHouseRoutingId export allows you to retrieve the Routing Bucket ID of a house instance. This is useful for checking if a specific house is currently active (someone is inside) or to manage instance-based logic inside houses.
How to Use
To get the routing ID of a house, use the following code:
Here’s an example of a command that checks if a specific house is occupied:
This example checks if the house identified by 'house' has an active routing bucket. If no one is inside (routingId is nil), it prints that nobody is home. If there is an active routing bucket, it prints the routingId, indicating the house is currently being used.
handleRentPayment
The housing:handleRentPayment event is triggered each time a rent payment is processed for a property. This allows external scripts to track rent-related activity or perform custom actions such as logging, rewards, or penalties.
Event Parameters
house: The name or ID of the house being rented.identifier: The identifier (usually Steam or Rockstar ID) of the player making the payment.payed: A boolean indicating if the rent was successfully paid (true) or not (false).
How to Use
To listen for rent payment events in your script, use the following pattern:
Here’s an example of how you could log all successful rent payments to a file:
This code listens for rent payments and writes successful transactions to a text file for later review.
GetPlayerHouses
The GetPlayerHouses export allows you to retrieve a list of all houses owned by a specific player. It returns an array containing the house identifiers linked to the player’s citizen ID. This is useful for checking ownership, granting access, syncing data with other scripts, or building custom systems like menus, permissions, or house-based rewards.
How to Use
To get all houses owned by a player, use the following code:
What It Returns
Array (table) of house names/IDs owned by the player
Returns an empty table if the player owns no houses
Common Use Cases
Show a list of player-owned houses in a menu
Check if a player owns at least one house before allowing an action
Sync housing ownership with external scripts (jobs, gangs, garages, etc.)
Grant temporary or permanent access based on ownership
Straight to the point: pass the player source in, get all their houses out. No extra logic, no callbacks.
initCurrentDecorations
The addDecorationToHouse export allows you to add a new decoration object to a specific house programmatically. This is useful for spawning furniture, props, or custom objects inside a house without using the in-game decoration menu.
How to Use
This will register the decoration for the specified house and spawn it using the provided model, position, and rotation. The decoration state (stash/house) is saved and handled by the housing system automatically.
AddFurniture
The AddFurniture export allows you to dynamically register a new furniture item into a specific furniture category inside the Quasar Housing system. This is useful when you want to extend the available furniture catalog at runtime, add custom props, or inject new items without modifying static config files.
How to Use
This will add the furniture item to the specified category, making it available in the Housing Furniture Creator and decoration menus. Once registered, players can place this furniture normally inside their houses, with placement, rotation, saving, and persistence fully handled by the housing system automatically.