Usage
Usage
This page explains how the script is used in-game and what admins should know.
Player Flow – Starting a Robbery
Find a start location
Players must walk to one of the coordinates defined in
Config.StartLocations.If they are within
Config.StartRadius, they see a help notification (e.g. “Press E to start break-in”).
Check requirements
Script checks if the player has the
Config.RequiredItemin their inventory (e.g.lockpick).Script checks if enough police are online based on
Config.Police.minOnline.
Consume item and cooldown
If requirements are met:
The required item is consumed server-side using the inventory bridge.
The player is put into a per-player cooldown (
Config.Cooldownminutes) before they can try again.
Play the minigame
The configured minigame provider is used:
boii_minigameswireps-uicirclesox_libskillCheckt3_lockpickor the fallback progress bar
If the minigame fails:
There is a chance to trigger a dispatch break-in call.
Cooldown still applies.
Teleport into a house
On success:
A house is chosen from
Config.Housesbased onchanceweights.The house's IPL is requested and the player is teleported to the configured
coord.A Discord log is sent if
Config.Discord.Webhookis set.Internal flags (
insideHouse,noiseLevel, etc.) are reset.
Inside the House
Noise System
When inside the house, the script constantly tracks the player’s behavior:
Walking
Running / sprinting
Shooting / actions
Crouching
Noise logic:
Running and actions increase noise faster.
Walking increases noise slowly.
Crouching causes noise to decay.
Noise is clamped between
0andConfig.Noise.Threshold.
HUD:
A bar at the bottom of the screen shows current noise percentage.
Alarm:
When
noiseLevel >= Config.Noise.Thresholdfor the first time:The alarm is triggered.
A dispatch “alarm” call is sent using the configured dispatcher.
Alarm will not retrigger again for that run.
Looting
The script spawns target zones (via
ox_targetorqb-target) for:Each loot spot defined in
Config.Loot.zones[house.ipl].A house exit zone.
When the player interacts with a loot zone:
The client checks if that zone was already looted in this run.
If not, it triggers the server event:
nasty:houseRobbery:loot(ipl, zoneIndex)
On the server:
It resolves the correct zone and item list.
It rolls a random item based on
chanceweights.It rolls a random amount between
minandmax.It gives the item via the inventory bridge.
It sends a localized loot notification using
NotifyandL('loot_found', amount, label).If Discord logging is enabled, it posts a loot embed.
Exiting the House
A target zone is created near the house exit.
Interacting with the exit:
Shows the localized label (e.g. “Exit house”).
Removes all loot zones and the exit zone.
Fades the screen out.
Teleports the player back to the door position they used to start the robbery.
Fades the screen back in.
After that, the player is outside and the robbery run is finished. Cooldown remains active until it expires.
Dispatch Behavior
The dispatch bridge separates two main events:
Break-in alert
Triggered when starting/failing the minigame (depending on configuration).
Uses
Dispatch.HouseBreakinon the server.Sends a “possible break-in” dispatch call with:
Player coords
Translated title/description
Configured job (police)
Alarm alert
Triggered by noise threshold via
Dispatch.HouseAlarm.Uses the player’s position and interior context.
Supported systems:
LB Tablet (
lb-tabletresource)tk_dispatch
ps-dispatch
Next Scripts dispatch (
dispatchresource)Or no dispatch (
Config.Dispatch = 'none')
Admin Notes
You can freely edit:
Start locations
Interiors and their chances
Loot tables per interior
Noise system values
Required item and cooldown
Minigame provider and difficulty
All texts are fully localized via
locale/locales.lua.If you run only one framework / inventory / target:
You can leave
Config.FrameworkandConfig.Inventoryon'auto'.
If dispatch or minigame resources are missing:
Script prints clean console warnings.
Fallback minigame is used when needed.
Last updated