How to Add a Custom Shell to ps-housing (QBCore)
To add a custom shell to ps-housing on QBCore, put the shell resource in your resources folder, start it before ps-housing, paste the generated entry into Config.Shells in ps-housing/shared/config.lua, restart, and use the entry name as the shell of a property. The entry below comes from a shell exported by the FiveMRides Shell Studio.
- Resource: unzip the shell into
resourcesand addensure my_shelltoserver.cfgbeforeps-housing. - Config: paste
configs/ps-housing_shell.luainsideConfig.Shells = { ... }ofps-housing/shared/config.lua. - Use it: the entry key (the label) is the shell name of your properties. Do not use the key
mlo. - Tested in game: QBCore 1.3.0 with ps-housing on FiveM Legacy: arrival on the floor at the entrance, interior doors, exit back at the door.
How do I add a custom shell to ps-housing?
- Unzip the shell. Unzip the ZIP from the Shell Studio so you have one folder with an
fxmanifest.lua, astreamfolder and aconfigsfolder. - Copy it to resources. Copy the folder into your server
resourcesfolder. Keep the folder name, it is the model name. - Start it first. Add
ensurefollowed by the folder name toserver.cfg, on a line beforeensure ps-housing. - Paste the config. Open
configs/ps-housing_shell.lua, copy the entry and paste it insideConfig.Shellsinps-housing/shared/config.lua. - Restart. Restart the server (a full restart is safer than restarting one resource while players are connected).
- Create or edit a property. Use the entry key as the shell of the property, then buy it, enter and leave to check the arrival point.
What does the generated entry look like?
The file starts with comments that name the script and the commit it was checked against, then one table entry. The numbers below are an example, yours come from your own shell:
["Modern flat"] = {
label = "Modern flat",
hash = `my_shell`,
doorOffset = { x = 0.0, y = -4.5, z = 1.0, h = 180.0, width = 1.5 },
stash = { maxweight = 100000, slots = 25 },
imgs = {},
},
hashis the model name of your shell, written with backticks so the game turns it into a hash.doorOffsetis measured from the centre of the shell. The player arrives there and the exit zone is drawn around the same point. The height already includes the player, sozis the floor plus 1.0.- ps-housing places the shell 25 m under the property door, so the property itself can be anywhere on solid ground.
z = 1.0 and h = 180.0, not 1 and 180. On FiveM with Lua 5.4, a whole number passed to a game function is read as an almost zero value. In our test the player landed one metre too low and fell through the floor, facing the wrong way. The exported configs always carry decimals; keep them if you edit the numbers.Where are the stash and the wardrobe?
ps-housing has no fixed stash, wardrobe or logout point in its shell config. They are furniture that the owner places in the house (Storage and Wardrobe items). Our config lists suggested spots from the shell origin in its comments, so you know where a good place is. The stash line only sets the size of the storage.
How do I test it before I create a property?
With the resource started, type /shelltest my_shell in game. The shell appears under you and you are placed at the entrance. Type it again to leave. /shellclock 23 sets your own clock to night so you can see the lights. The command refuses a spot where there is water above the shell, so stand on dry land.
Frequently asked questions
Why must the shell start before ps-housing?
ps-housing asks the game for the shell model when a player enters. If the shell resource has not started yet, the model is not known and the load fails. Put the ensure line of the shell above ps-housing, then restart.
Does the shell work with qb-houses or qbx_properties too?
The same ZIP also holds configs for those scripts, see the guide for the other housing scripts. Only ps-housing and esx_property were tested in game.
I enter the property and fall through the floor.
Check that the config entry kept its decimals (1.0, not 1) and that you pasted our entry without changing the offsets. The full list of fixes is in the shell problems guide.
Where does the shell appear on the map?
Nowhere permanently. A shell is a model that ps-housing spawns 25 m under the property when someone enters. You place the property with ps-housing as usual.
Do I have to rebuild the shell if I change the stash size?
No. The stash size is only a number in your ps-housing config.
Does it work on GTA V Enhanced?
Not yet. The shells are built for FiveM on GTA V Legacy.