NullSect
Systems nominal

Docs / House Robbery / Installation

Installation — ns-houserobbery

Requirements

  • oxmysql (required)
  • OneSync (routing buckets, server-side entities)
  • Qbox (recommended), QBCore or ESX
  • Optional: ox_lib, ox_target or qb-target, ox_inventory, a time sync that publishes GlobalState.currentTime (Renewed-Weathersync; the original qb-weathersync does not, then the server clock is used), a dispatch resource (ps-dispatch, cd_dispatch, rcore_dispatch, core_dispatch), ns-carthief

Without a target resource a built-in [E] prompt is shown at the doors and points.

1. Files

Put ns-houserobbery into your resources (for example resources/[nullsect]/ns-houserobbery). Keep the folder name.

2. Stop qbx_houserobbery

qbx_houserobbery listens to the same lockpick event and uses the same apartment interiors. Do not run both. Remove it from your ensure lines (or rename its folder to [disabled]).

3. server.cfg

ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_target
ensure ox_inventory
ensure [qbx]
ensure ns-carthief        # optional: forwards a used lockpick to our door
ensure ns-houserobbery

add_ace group.admin ns-houserobbery.admin allow

4. Database

Tables are created and updated on start (Config.Database.autoMigrate = true). Set it to false if you would rather import sql/ns-houserobbery.sql yourself (updating from 0.4.1 or older with autoMigrate = false: run sql/upgrade-0.4.2.sql once).

TableHolds
ns_houserobbery_profilesburglar level, XP, counters, earnings, inside_house (crash recovery), the day's fence total per character
ns_houserobbery_houseshouses added with /hrhouse and on / off switches of the config houses
ns_houserobbery_pointsinterior points added with /hrpoint and switches of the config points
ns_houserobbery_metaschema version

5. Items and images

  1. ox_inventory: copy the entries of install/items_ox.lua into ox_inventory/data/items.lua. qb-core: copy install/items_qb.lua into qb-core/shared/items.lua. ESX: create items with the same names.
  2. Copy install/images/*.png to ox_inventory/web/images/ (or your inventory's image folder).
  3. The door uses the existing lockpick / advancedlockpick items. The crowbar is ns_hr_crowbar — give it to a shop or a crafting recipe (or set Config.Items.crowbar to an item you already have, false = no crowbar).

Stolen goods (ns_hr_*) are only bought by our fence.

6. Lockpick item (optional)

The door always has a Pick the lock option. If you also want using a lockpick from the inventory next to the job door to start the lock, run ns-carthief: it takes over the lockpick item and forwards a use away from vehicles as lockpicks:UseLockpick (Config.Items.listenUseEvent), which this resource listens to.

7. Place the interior points (important)

The houses ship with the config, and so do a few search and big-item points per interior, but those are rough guesses. The alarm panel, the safe and the beds are not in the config at all. Set every interior up once with the in-game editor:

  1. /hredit (admin) opens the editor for the interior you are near, or takes you to one: /hredit low_apt, /hredit mid_apt, /hredit high_house (the tabs at the top switch too). Closing brings you back.
  2. Fly through the room: hold the right mouse button and move the mouse to look, W A S D to fly, Q / E down / up, Shift faster, Alt slower, the mouse wheel changes the speed.
  3. Add (left panel): pick a kind, then click a floor, a table or a wall. A prop stands on a floor with its bottom; things on a wall face out of it. Every interior needs at least an alarm panel (keypad next to the entrance), a safe (mid and high houses roll it) and one bed per sleeping resident.
  4. Change (a click on a marker or a prop, or the list on the right): drag the arrows to move it, R switches to the ring to turn it, pick the item / search type / prop in the panel, G stands a prop on the floor, Del deletes, Ctrl+Z undoes. T switches the arrows between world and object axes.
  5. Every change is saved at once in the database (ns_houserobbery_points). The config file is not changed; edited config points keep their ids.

What you see in the editor is what a job spawns: a big item is carried with the prop you picked, a panel / safe / search spot with a prop gets that prop in the house, a bed shows the resident lying where they will sleep.

Without a panel point a house has no alarm, without a safe point no safe, without beds nobody is home.

The chat commands still work at your own position: /hrpoint panel | safe | bed | search <type> | pickup <item>, /hrpoint list, /hrpoint remove <id>.

More houses: stand at a front door and /hrhouse add <low|mid|high>. /hrhouse list shows all houses, /hrhouse toggle <id> switches one on / off.

8. Check

  1. The console shows ready (framework=qbox, inventory=ox, core=1.0.0).
  2. At night (game time 21–05 by default) go to the informant (Config.Contracts.informant) and Ask for work.
  3. Run the job; afterwards the informant marks the buyer on your map.

Set Config.Debug = false again when you are done.

9. With ns-illegal (optional)

Nothing to configure: start both in any order. While ns-illegal runs, the career level unlocks the house types (mid at level 5, high at 10: Config.Tiers[x].illegalMinLevel), ns-illegal's house contacts open the same offers as the informant (the night hours, police and cooldown rules stay), and finished jobs give career XP. Players without a Dark Tablet name get the cheapest type only. Switch it off with Config.Integrations.illegal = false. Not tested in game yet.

Troubleshooting

ProblemCause / fix
"The system is starting, try again in a moment." does not go awayThe database is not reachable. Check the oxmysql error in the console, then restart the resource.
"Come back at night." during the nightYour time sync does not publish GlobalState.currentTime: set Config.Clock.provider = 'real' (server clock) or use Renewed-Weathersync.
"Too few police on duty."Config.Police.minOnDuty for that house type. Police must be on duty with a job in Config.Police.jobs.
No alarm / safe / residents everThe interior has no panel / safe / bed point. See step 7.
A player is in an empty interior after a crashOnce the character has spawned, the client asks the server to recover: a player standing in an interior is moved to the house door. If it does not happen, check the console for a database error (the inside_house value) and that Config.Instance.nearInteriorDistance covers the interior.
Using a lockpick does nothing at the doorUse the door's Pick the lock option, or run ns-carthief (step 6).
Two robbery scripts react to a lockpickqbx_houserobbery still runs (step 2).

Cart

Your cart is empty.