Installation
Guide for installing ps-housing
Setup Video by Kamaryn
Installation Instructions
Pay Attention to each step, Don't skip any of them.
1. Find the following events inside qb-multicharacter and change in server/main.lua event to:
qb-multicharacter and change in server/main.lua event to:2. Find the following events in qb-spawn and change in client/client.lua event to:
qb-spawn and change in client/client.lua event to:3. Find the following events in qb-garages and change:
qb-garages and change:Replace
With
For qb-garages V2:
Replace
With
4. Run the properties.sql file, but be cautious. If a table named properties already exists in your database, this operation will drop it, resulting in the loss of all its data.
properties.sql file, but be cautious. If a table named properties already exists in your database, this operation will drop it, resulting in the loss of all its data.5. Delete default qb-apartments
6. Delete default qb-houses
7. Delete qb-apartments/config.lua references in qb-spawn, qb-multicharacter and qb-phone fxmanifest.lua (and any other scripts that may reference it).
qb-apartments/config.lua references in qb-spawn, qb-multicharacter and qb-phone fxmanifest.lua (and any other scripts that may reference it).8. Install the dependencies.
Server.cfg Resource Order
Notes
If a player is in their apartment/house and an admin does a "Bring to me" function, they will not see the player nor will the player see anyone else. This is because the player is still in their own unique routing bucket. Workaround: To fix this, the player must go back into their apartment and leave on their own.
Likewise, if an admin tries to "Go to" or "Spectate" a player that is in their apartment/house, the admin will not be able to see the apartment or player because it is in a different routing bucket.
We highly recommend making a folder named [ps-housing] and adding
ps-realtor,fivem-freecam,ox_lib,ps-housinginside the folder.
Logs System Setup
Go to
qb-smallresources/server/logs.luaand add this:
Create a webhook for the channel you want the logs to show up in.
Replace the placeholder with your webhook link.
This system only supports qb-core for now.
Item Limits System
Choose an item you want to limit under
Config.Furniturein undershared/config.luaAdd
["max"] = 3or the number of your choice to the item (see example below)
Resolving the "Foreign key constraint is incorrectly formed" Issue
If you come across an error such as Foreign key constraint is incorrectly formed while importing the properties.sql into your database, follow these steps to fix it.
Open your database in HeidiSQL.
Right-click on your database name and select "Edit."
Locate the database collation setting and take note of it.
You will need to format the
properties.sqlfile to match your database collation.
If your database collation is set to utf8mb4_general_ci, modify the last line of the properties.sql file using VSCode or in HeidiSQL's query tab to the following:
This adjustment ensures that properties.sql file's character set and collation match that of your database, effectively resolving the issue.
Last updated