XS-Housing
Houses, apartments, MLOs, offices and motel rooms for Qbox and QBCore, all built in game. Players buy, rent or take a mortgage, and run their home from a smart-home panel on the wall.
Requirements
ox_libandoxmysql- Qbox (
qbx_core) or QBCore (qb-core)
Optional:
- A target script. Without one, every door uses E prompts
- A door lock script for MLO houses. Without one, XS-Housing uses its own lock
bob74_iplfor GTA interiors with décor stylesscreenshot-basicto take listing photos in the builder- Shell packs. 23 of the shells are free in K4MB1's starter pack. The rest need their pack streamed on your server
Installation
- If you use another housing script, stop it before players use the new places.
- Drop
XS-Housinginto your resources and addensure XS-Housingafterox_libandoxmysql. - Give your staff the builder:
add_ace group.admin xs.housing.admin allow - Restart the server. The tables make themselves on the first start.
- Join, type
/housebuilderand build your first place.
The builder's Tools page brings over houses, owners and keys from qb-houses, qbx_properties and ps-housing.
The builder
/housebuilder opens the builder. The Overview shows how far your setup has got and lists anything missing with a button straight to it. Each place has its own editor, and you can change many places at once.
- Quick place: walk down a street and make a house at every door you aim at.
- Settings: almost everything in
config.lua, changed live for everyone with no restart. - Ctrl+K searches places, settings and pages.
Kinds of place
- Street houses: a front door that leads into a shell or a GTA interior, and a yard drawn as a square, hexagon, circle or your own corners.
- MLO houses: pick the real doors and draw the rooms. Locks go through your door lock script.
- Apartment buildings: one lobby door and as many apartments as you want, each with its own owner.
- Offices, motel rooms and garages, plus places only a job or a crew can buy.
Every place gets its own private copy of its inside, so any number of front doors can use the same shell or GTA interior.
Shells and interiors
There are 176 shells and 66 GTA interiors to pick from, and owners can change the décor style of the GTA ones.
23 of the shells are free in K4MB1's starter pack. The others need their pack streamed on your server, or the inside is empty. The 6 shells from envi_starter_shell_pack do not say where their inside door is, so place it once in the builder for each place that uses one.
Buying, renting and mortgages
Players buy outright, rent, or take a mortgage with a deposit and a payment plan. Rent and mortgage payments come out on their own, with grace days, late fees, eviction and repossession.
- Property tax, power and water bills, and home insurance are optional.
- Starter apartments give new characters a place, made on the spot when the building runs out.
- Logging out inside a house puts you back inside on login.
The real estate job
Agents list places, set prices within a range, and sign buyers for a commission. On duty, /housetablet opens the agent tablet. When no agent is working, players buy at the For Sale sign.
- Listings have a photo, a tour inside before buying, and a mortgage calculator.
- Open houses: owners, or agents for places on the market, open the door for 15 minutes so anyone can walk in, with a map blip.
The smart-home panel
Every place has a panel on the wall: lock, lights, music, doorbell, alarm, cameras, keys, payments, storage and décor. /house opens it from anywhere. At a place it opens that one, anywhere else it lists your places. Furnishing still needs you there.
Keys go to co-owners, tenants and guests, and guest keys can run out.
Furniture, music and TV
- Furniture for inside and the yard: storage, safes, beds, seats, lamps, speakers and TVs that work once placed.
- Music and TVs play YouTube, Twitch and direct links, in sync for everyone in the room and quieter further away. No sound script needed.
- Storage grows with upgrades, there is a wardrobe, and anything left behind after moving out waits at the agency.
- Fridges keep food fresh four times longer, for ox_inventory items with decay.
Break-ins, alarms and raids
- Doorbell and knocking, with a phone alert and letting people in from afar.
- Break-ins with a lockpick, harder behind better locks. Safes stay shut. The item is
lockpickand can be changed in Settings › Break-ins. - A break-in leaves evidence: a fingerprint at the door when no gloves are worn, and a forced lock police can inspect until the owner repairs it.
- Alarms call the police and the owner, and the cameras can be watched from the panel.
- Police raids, with a warrant check through XS-MDT.
Your other scripts
XS-Housing finds your door lock, garage, inventory, clothing, phone, dispatch, banking and weather scripts on its own. /housediag prints what it found.
- Places with a garage add one to your garage script, including XS-Garages.
- XS-Phone's Home app lists places, locks and unlocks them, and hands out keys.
- XS-MultiCharacter lists your places in its spawn picker.
Troubleshooting
/housebuilder does nothing
You do not have access. Run add_ace group.admin xs.housing.admin allow and restart.
The inside of a house is empty
That shell's pack is not streamed on your server. Stream the pack, or pick one of the 23 free K4MB1 starter shells.
An MLO door does not lock
Run /housediag to check your door lock script was found, then pick the real doors again in the place's editor.
Listing photos stay blank
screenshot-basic is not running. Start it, then take the photo again in the builder.
Break-ins say I need a lockpick
Your server's lockpick item has another name. Set it in Settings › Break-ins.
Updating
- Back up the database first.
- Keep a copy of your edited
config.lua. - Replace the resource folder, merge your config back and restart.
Places, owners, keys, furniture and settings live in the database, so nothing you built is lost.
Support
Bugs and questions go to the Discord. Include your server's console output — the resource prints the reason when it refuses to do something, and that line is usually the whole answer.