Installation
Install Advanced Housing (sd-housing) with its three companion resources, import the walk-in houses and check that buying, locks and decorating work before you open it to players.
Dependencies
| Dependency | Required | Notes |
|---|---|---|
| Qbox / QBCore or ESX | Yes | The bridge detects qb-core (also provided by qbx_core) or es_extended at start. |
ox_lib | Yes | Required by sd-housing and sd-housing-towers. |
oxmysql | Yes | Properties, keys, decor, mail and logs are saved to the database. |
sd-housing-assets | Yes | Listed as a dependency of sd-housing. Streams every model and texture the script uses. |
sd-housing-interiors | Optional | The walk-in houses. Without it, properties are made by hand in the admin panel. |
sd-housing-towers | Optional | The apartment towers. Needs ox_lib and ox_target. |
ox_target, qb-target or qtarget | Optional for sd-housing | Used for the home panel, the agency desk, windows and the battering ram. Without one, sd-housing shows a prompt instead. sd-housing-towers requires ox_target. |
ox_inventory | Optional | Stashes, safes and mailbox parcels. |
qbx_garages | Optional | Property garages. |
| A clothing resource | Optional | Wardrobes. illenium-appearance by default, see configs/shared/points.lua. |
pma-voice | Optional | Voice on intercom calls. |
A property only offers what is running. With no ox_inventory there is no stash, with no qbx_garages there is no garage point.
1 Add the Resources
Extract all four resources into your resources directory and keep their folder names:
resources/[housing]/sd-housing/
resources/[housing]/sd-housing-assets/
resources/[housing]/sd-housing-interiors/
resources/[housing]/sd-housing-towers/sd-housing-interiors and sd-housing-towers are map resources. If you do not want the walk-in houses or the towers, leave that resource out.
2 Database
There is no SQL file to import. sd-housing creates its tables on first start through your existing oxmysql connection, so the database user needs permission to create tables. All tables start with sd_housing_. See Updating for the list.
3 Set the Start Order
Start sd-housing-assets before sd-housing, and start sd-housing after sd-housing-interiors and sd-housing-towers when you use them. These are ordering examples. Keep your framework's own prerequisites.
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_target
ensure ox_inventory
ensure qbx_garages
ensure sd-housing-interiors
ensure sd-housing-towers
ensure sd-housing-assets
ensure sd-housingensure oxmysql
ensure ox_lib
ensure qb-core
ensure ox_target
ensure ox_inventory
ensure sd-housing-interiors
ensure sd-housing-towers
ensure sd-housing-assets
ensure sd-housingensure oxmysql
ensure ox_lib
ensure es_extended
ensure ox_target
ensure ox_inventory
ensure sd-housing-interiors
ensure sd-housing-towers
ensure sd-housing-assets
ensure sd-housingRestarting the asset resources
Restart sd-housing-assets only with nobody connected. A resource that streams models under live entities can crash a client when it restarts. sd-housing itself streams nothing and can be restarted with players on.
4 Grant Admin Access
The admin panel opens for group.admin by default. Every change needs the edit ace. Add it to your permissions:
add_ace group.admin sd_housing.edit allowWithout the edit ace an admin can open the panel but change nothing. The command, the groups and the ace name are in configs/shared/admin.lua. See Admin Panel.
5 Add Items
sd-housing adds one item of its own, the police battering ram. Add it to ox_inventory/data/items.lua:
['battering_ram'] = {
label = 'Battering Ram',
weight = 16000,
stack = false,
close = true,
consume = 0,
client = { image = 'battering_ram.png', export = 'sd-housing.useRam' },
},The break-in features use items most servers already have. Their names are set in the config, so change them there if yours differ:
| Item | Used for | Config |
|---|---|---|
lockpick, advancedlockpick | Picking a locked door | Security.Burglary.Picks |
screwdriverset, drill | Breaking a stash open | Security.Burglary.Stash.Items |
drill, electronickit, thermite | Cracking a safe, by tier | Safes.Tiers |
battering_ram | Breaking a door down as police | Doors.Ram.Item |
6 Import the Walk-in Houses
With sd-housing-interiors running:
- Join the server as an admin and run
/housingadmin. - Press Import walk-in houses.
Each house is named after its street, priced by its floor area (Walkin.PricePerSqm) and put up for sale. A detached garage comes with its house. Importing again later adds new houses and refreshes the doors of the others. Owners, keys, names and prices are left alone.
To import with nobody on the server, run this in the server console:
sdh_walkin_importThe flats of sd-housing-towers need no import. They are created the first time the server starts with both resources running.
7 Review the Config
Before launch, decide at least these:
| File | Decide |
|---|---|
configs/shared/properties.lua | Payment account, how many properties a character may own, the sell-back share, keys. |
configs/shared/realtor.lua | Where players may buy, the agency desk location, the realtor job and commission. |
configs/shared/walkin.lua | Price per square metre and which regions are open. |
configs/shared/apartments.lua | Flat prices and whether new characters get a starter flat. |
configs/shared/security.lua | Phone, dispatch, police jobs, alarm and burglary rules. |
configs/shared/points.lua | Stash size and the wardrobe event of your clothing resource. |
See Configuration for every file.
8 Start and Verify
Start the server and check the console. sd-housing prints the framework it detected, and the phone and dispatch it selected. Then test in game:
- Open
/housingadminand confirm the imported houses are listed. - Walk up to a house for sale. Its porch prompt opens the listing. Buy it.
- Lock and unlock the front door with
Eat the door. - Use the home panel on the wall by the front door.
- Open decorate mode from the panel or with
/decorateand place a piece of furniture. - Visit a tower lobby and talk to the receptionist at the front desk.
- With a second player, ring the doorbell and hand out a key.
See Troubleshooting if a check fails.
Any Other Building
A property does not need the walk-in pack. Stand at a building's door, open /housingadmin and choose Add a property here. Then pick its doors in the property's drawer: aim at a door and press E. A double door takes both leaves. See Admin Panel.
