Skip to content

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 ​

DependencyRequiredNotes
Qbox / QBCore or ESXYesThe bridge detects qb-core (also provided by qbx_core) or es_extended at start.
ox_libYesRequired by sd-housing and sd-housing-towers.
oxmysqlYesProperties, keys, decor, mail and logs are saved to the database.
sd-housing-assetsYesListed as a dependency of sd-housing. Streams every model and texture the script uses.
sd-housing-interiorsOptionalThe walk-in houses. Without it, properties are made by hand in the admin panel.
sd-housing-towersOptionalThe apartment towers. Needs ox_lib and ox_target.
ox_target, qb-target or qtargetOptional for sd-housingUsed 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_inventoryOptionalStashes, safes and mailbox parcels.
qbx_garagesOptionalProperty garages.
A clothing resourceOptionalWardrobes. illenium-appearance by default, see configs/shared/points.lua.
pma-voiceOptionalVoice 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:

text
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.

cfg
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-housing
cfg
ensure 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-housing
cfg
ensure 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-housing

Restarting 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:

cfg
add_ace group.admin sd_housing.edit allow

Without 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:

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:

ItemUsed forConfig
lockpick, advancedlockpickPicking a locked doorSecurity.Burglary.Picks
screwdriverset, drillBreaking a stash openSecurity.Burglary.Stash.Items
drill, electronickit, thermiteCracking a safe, by tierSafes.Tiers
battering_ramBreaking a door down as policeDoors.Ram.Item

6 Import the Walk-in Houses ​

With sd-housing-interiors running:

  1. Join the server as an admin and run /housingadmin.
  2. 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:

text
sdh_walkin_import

The 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:

FileDecide
configs/shared/properties.luaPayment account, how many properties a character may own, the sell-back share, keys.
configs/shared/realtor.luaWhere players may buy, the agency desk location, the realtor job and commission.
configs/shared/walkin.luaPrice per square metre and which regions are open.
configs/shared/apartments.luaFlat prices and whether new characters get a starter flat.
configs/shared/security.luaPhone, dispatch, police jobs, alarm and burglary rules.
configs/shared/points.luaStash 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:

  1. Open /housingadmin and confirm the imported houses are listed.
  2. Walk up to a house for sale. Its porch prompt opens the listing. Buy it.
  3. Lock and unlock the front door with E at the door.
  4. Use the home panel on the wall by the front door.
  5. Open decorate mode from the panel or with /decorate and place a piece of furniture.
  6. Visit a tower lobby and talk to the receptionist at the front desk.
  7. 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.