Project-Sloth/ps-housing
Fork: 108 Star: 339 (更新于 2024-10-29 21:54:12)
license: NOASSERTION
Language: Lua .
Advanced housing system for QBCore.
最后发布版本: 2.0.3 ( 2024-09-24 03:46:28)
ps-housing IPL & MLO Support
Table of Contents
Description
ps-housing is a resource that opens up a world of creative possibilities for housing. Its user-friendly interface lets you decorate any location to your heart's content. The best part? Not only is it completely free, but it's also reliable and functional, unlike many other housing systems available. What's included?
- Players can decorate their houses and apartments with a full selection of furniture and decorations (included a wide variety of custom housing props)
- Provides support for housing and apartments and is a full replacement for qb-apartments and qb-housing
- When a player first spawns after enabling ps-housing, they will have to choose an apartment. Once they spawn in the stashitems from their previous qb-apartment will be migrated to their new apartment stash.
- Allows players to purchase and list houses for sale through
ps-realtor
and the realtor job - Houses come with personal garages
- Houses and apartments come with personal wardrobes and stashes
- Players can share keys to their houses and apartments with other players
Creating a new property for sale
Players must have the realtor job to create new properties. Additionally if the realtor has a high enough grade level, they can also help players move to new apartments. All properties must be manually configured for sale by the realtor job, giving you full control over all aspects of properties, and bringing another avenue of roleplay to your server.
- Pick the location where you want to create a new property
- Use
/housing
to open the housing menu - Click on create new property
- Fill out the details of the property (name, price, description, which shell to use, etc)
- Choose the door location (this is where the person will enter the house)
- Ensure that you place it up against a wall, since players will use target to enter the house
- Choose the garage location
- This point is used both for storing vehicles, as well as the location where the vehicle will spawn when taken out of the garage
- Realtors can edit the details of the property by clicking on the property in the housing menu
- Players can see the properties for sale through the /housing menu as well
Furnish and decorate a property
Once inside the property, the player can furnish and decorate the property to their liking. They can also invite other players to their property, and give them access to the property. Open the furniture store by pressing Z
.
This will open a furniture store complete with all of the props. Select an item from the catalog and place it into the property. You can use the placement gizmo to position the item to your liking as well as use the UI tools for fine tune control over the placement. Once you are happy with the positioning, make sure you press Add to Cart
before moving on. Continue to add as many items as you want to your cart. Once you are done, go to the Checkout
and purchase the items.
Note: The place on ground button sometimes does not work properly depending on where the native detects the ground to be.
Shell Support
Installation
Follow either one or the other installation guides below based on your setup:
Remember to install the following dependencies if you don't already have them:
Furthermore, make sure you start the shown dependencies in the correct order as below:
-- server.cfg
ensure ox_lib
ensure ps-realtor
ensure ps-housing
ensure fivem-freecam
Stashes
- Players need to place their stash and wardrobe or else they wont have one. Check Config for more information.
This entire README is meant for compatibility with default QBCore scripts. If you have different scripts, you'll need to adjust them for compatibility yourself. Refrain from asking us how to circumvent paid scripts that can't be adjusted for ps-housing support. Instead, request their support for ps-housing - this script is fully open source for that reason. Any inquiries related to this be ignored.
Migrating houses/apartments
-
From a client run the
migratehouses
command to automatically convert all houses from qb-houses. It will print a message to the console once complete. Themigratehouses
command MUST be run from a client in order to retrieve street and region data for each house -
From a client or server console run the
migrateapartments
command to automatically convert all apartments from qb-apartments. It will print a message to the console once complete.
Item Limits System
- Choose an item you want to limit under
Config.Furniture
in undershared/config.lua
- Add
["max"] = 3
or the number of your choice to the item (see example below)
{ ["object"] = "v_res_r_figcat", ["price"] = 300, ["max"] = 2, ["label"] = "Fig Cat" },
Logs System Setup
- Go to
qb-smallresources/server/logs.lua
and add this:
['pshousing'] = 'yourdiscordwebhookhere',
- 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.
Adding New Shells
- Follow the ps-housing wiki information.
Dynamic Doors
Dynamic Doors will turn placed doors into actual working doors, Instead of them being static. (See videos below)
Preview
https://github.com/complexza/ps-housing/assets/74205343/72cfc135-2f78-42b3-a540-45f02567b6d7
https://github.com/complexza/ps-housing/assets/74205343/0ff26e7f-1341-45fc-8fc6-d65421dec0b2
Setup
- You will need to set the
Config.DynamicDoors = true
- You will have to add this convar into your server.cfg
setr game_enableDynamicDoorCreation "true"
Note: The convar has to be in your server.cfg in order for the doors to be dynamic!
FAQ
Error: Foreign key constraint is incorrectly formed
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 take a note of it.
- You will need to format the
properties.sql
file to match your database collation. - Ensure that the collation of your
citizenid
column in yourplayers
table isutf8mb4_general_ci
and notutf8mb4_unicode_ci
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:
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
This adjustment ensures that properties.sql
file's character set and collation match that of your database, effectively resolving the issue.
Preview
Credits
ps-housing owes its existence to the exceptional coding expertise of Xirvin#0985. His application of top-tier coding practices has been instrumental in creating this script. We at Project Sloth are thrilled that he has joined our team and utilized our platform to deliver this incredible, much-anticipated resource. Our sincere appreciation goes out to Xirvin for his outstanding contribution!
最近版本更新:(数据更新于 2024-10-06 12:46:04)
2024-09-24 03:46:28 2.0.3
2024-09-10 08:41:15 2.0.2
2024-09-10 07:55:13 2.0.1
2024-09-09 13:28:48 2.0.0
2024-07-06 23:39:04 1.2.2
2024-02-19 17:14:06 1.2.1
2023-11-27 11:18:47 1.2.0
2023-10-06 00:04:24 1.1.4
2023-08-28 07:41:40 1.1.3
2023-08-22 23:26:07 1.1.2
Project-Sloth/ps-housing同语言 Lua最近更新仓库
2024-11-04 19:56:29 LazyVim/LazyVim
2024-10-31 16:03:37 kenzok8/small
2024-10-29 21:38:37 xiaorouji/openwrt-passwall
2024-09-26 21:56:43 echasnovski/mini.nvim
2024-09-25 11:44:46 iDvel/rime-ice
2024-09-24 22:20:36 AstroNvim/AstroNvim