Skip to content

Robbery ​

Register Safe time lock Get away
Register Safe Escape

A shop can be robbed when its definition has robbery = { enabled = true, … }. The values there win over the defaults in Config.Robbery (shared/config/robbery.lua). Turn robberies off everywhere with Config.Robbery.enabled = false.

lua
robbery = {
  enabled = true, minCops = 3, cooldown = 2700, closedMinutes = 10, loot = 'cash',
  register = { 600, 1200 },              -- or { seconds = 25, loot = { 600, 1200 } }
  registers = { vec3(...) },             -- default: the shop's counters
  safe = { coords = vec3(...), loot = { 2000, 5000 }, lock = 120 },   -- or false; default: Config.Robbery.safes[id]
}

Requirements ​

The server checks all of these before a step starts:

  • the shop is robbable and open (requireOpen);
  • enough police on duty: minCops (default 2) players of the Config.Jobs.police group;
  • no cooldown on the shop (45 minutes from the first loot) or on the character (20 minutes). An attempt that was aborted without loot still blocks the shop for 5 minutes;
  • nobody else is robbing that shop;
  • a weapon is drawn (needWeapon). Flashlights, fire extinguishers, jerry cans, balls and similar are not weapons (blockedWeapons);
  • the register is filled;
  • no beforeRob hook vetoes it (Exports & hooks).

Three steps ​

Each step is a hold: stand at the target and hold G (Config.Robbery.key, players can rebind it). With np_menu running, registers, safes and display cases also get a context option. The server sets the duration and checks the time and the distance when the step finishes. Walk away and the step is canceled.

1. Register ​

Hold for 25 s at a register. The loot is a roll between $400 and $900 (or the shop's own register range), scaled by how full the register is. An emptied register fills up again over 60 minutes. Below 25 % it counts as empty.

2. Safe ​

The default stores have safes (Config.Robbery.safes: 24/7, LTD, Rob's Liquor). The safe can only be started after the register of the same robbery, within 3 minutes (requireRegister, windowSeconds).

  • Lockpick: needs a lockpick item, which breaks with a 35 % chance. A 2-minute time lock runs first; stay within 15 m. Then hold for 30 s. The server refuses to finish before the time lock plus 90 % of the hold has passed (too_early), so a long time lock can't be skipped.
  • Extort: force the clerk to open it. The hold is only 12 s.

With np_minigames running, the lockpick method is a game instead of the 30 s hold; see Minigames.

The safe pays $1,500 to $4,000.

3. Display cases ​

Vangelico has 20 display cases (Config.Robbery.cases). Smashing one takes 5 s and rolls jewelry: gold rings, gold chains, diamond rings and Rolex watches. The loot is marked as stolen (metadata.stolen, stolenFrom, stolenAt), so a pawn shop refuses it or pays less. Cases need 3 police and have their own 60-minute cooldown. They work even though Vangelico's register is not robbable.

Every smashed case fires the server-local event np_shops:luxury:caseSmashed. Jewelry-heist resources can start their event from it (Events).

Minigames (np_minigames) ​

With np_minigames running (and Config.Robbery.minigames.enabled, the default), opening a safe with a lockpick is a game, not a 30 s hold. The time lock still runs; then you press G at the safe and np_minigames plays its lockpick game on hard.

  • The server judges it. The game runs and is checked on the server. Only a win pays out.
  • A lost game opens nothing. It breaks the pick with breakChance (0.35), always when the pick snapped (reason broken), and the safe can be tried again while the safe window lasts (with a new time lock).
  • Everything else stays. The token, the weapon and distance checks, the alarms, the police call and the payouts work as before. Forcing the clerk is still a hold.
  • Register and cases are opt-in. The register and the display cases keep their holds by default. Set minigames.register.game / minigames.case.game to 'skillcheck' or 'power' to change that; a lost game ends the attempt like letting go (a case stays whole, the others stay open).
lua
-- shared/config/robbery.lua, inside Config.Robbery
minigames = {
  enabled = true,
  wait = 180000,                 -- ms the client waits for robbery.finish while the game runs
  safe = { game = 'lockpick', difficulty = 'hard', opts = {}, breakChance = 0.35, breakOn = { 'broken' } },
  register = { game = 'hold', difficulty = 'easy', opts = {} },               -- 'hold' (default), 'skillcheck', 'power'
  case = { game = 'hold', difficulty = 'easy', opts = { rounds = 2 } },       -- 'hold' (default), 'skillcheck', 'power'
},

The safe can also be crack, drill, pattern or wires (np_admin offers these). Every option is on np_admin's settings page (Robbery). Without np_minigames, or with Config.Integrations.np_minigames = false, nothing changes.

Loot ​

The loot is paid as black money by default (Config.Robbery.loot, or 'cash'). The robbery HUD shows the step, the progress and the loot so far. After the last loot, a get-away timer (90 s) runs on the HUD and in the phone's Dynamic Island.

Police and dispatch ​

  • The clerk presses the silent alarm with a 60 % chance, 5 to 15 seconds after the robbery started. Otherwise the clerk calls the police 20 s after the robber left.
  • The call goes through the first dispatch that runs: np_mdt, np_drugs, ps-dispatch, cd_dispatch, qs-dispatch, or the built-in alert (a toast and a blip for 120 s for police on duty). Code 10-90, priority 1 (dispatch.priority: 1 most urgent, 2, 3), the shop's label as caller. np_mdt gets a call of kind alarm with a numeric priority, the shop as caller object and title and message cut to its limits (120 and 500 characters).
  • The shop closes for 10 minutes (closedMinutes). Its blip grays out and the phone shows "robbed".
  • A clerk threatened outside a robbery (np_npchandler incident) also calls the police, at most once per shop every 5 minutes (clerkAlarm).

Owners and insurance ​

For a player-owned shop, the loot is booked as a loss in the ledger (at most the business account balance), and the insurance pays back 50 % (insurancePercent) of what the account lost, not of the loot. The owner gets a notice: a phone banner when online, a mail when offline.

Every robbery writes a row to np_shops_robberies, reports to np_gangs, and fires np_shops:server:robbed with the shop, coords, robber and total loot.

Clerks ​

Shops with clerk = { model = '…' } get a clerk NPC (Config.Clerks).

  • The clerk is a networked, always spawned np_npchandler NPC, with greetings, a staff-only warning and a hostile response. Its incidents raise the robbery alarm.
  • During a robbery the clerk raises the hands, presses the alarm, or at Ammu-Nation fights back with a shotgun (only when the robber's client controls the clerk ped, otherwise it raises the hands). It calms down 30 s after the robbery ended.
  • The clerk is hidden while a player employee of the shop is on duty (hideWhenStaffed).

Staff tools ​

Reset a shop's robbery cooldown with the np_admin staff tool Reset robbery cooldown (node np_shops.robbery) or in the shop editor.

All options ​

Option Default Description
enabled true Robberies on
key 'G' Hold key
minCops 2 Police on duty. A shop's robbery.minCops wins
cooldownMinutes, playerCooldownMinutes, cancelCooldownMinutes 45, 20, 5 Shop, character and aborted-attempt cooldowns
closedMinutes 10 The shop stays closed this long
requireOpen, needWeapon, blockedWeapons true, true, see file Conditions
loot 'black_money' 'cash' or 'black_money'
register { seconds = 25, radius = 2.0, loot = { 400, 900 }, fillMinutes = 60, minFill = 0.25 } Register step
safe { lockSeconds = 120, seconds = 30, extortSeconds = 12, radius = 2.0, waitRadius = 15.0, windowSeconds = 180, requireRegister = true, loot = { 1500, 4000 }, methods = { lockpick = true, extort = true }, lockpickItem = 'lockpick', lockpickBreakChance = 0.35 } Safe step
minigames enabled = true, safe lockpick hard, register and case hold np_minigames games per step: game, difficulty, opts; for the safe also breakChance and breakOn; wait
escapeSeconds 90 Get-away timer
silentAlarmChance, alarmDelay, lateCallSeconds 0.6, { 5, 15 }, 20 Police call
insurancePercent 50 Share of the owner's loss (at most the balance) the insurance pays back
alertBlipSeconds, dispatch 120, { code = '10-90', priority = 1 } The alert. Priority 1 (most urgent), 2 or 3 is np_mdt's scale; other dispatchers map it. The np_mdt adapter also maps the old words (high = 1, medium = 2, low = 3)
clerkAlarm { enabled = true, minutes = 5 } Threatened clerk outside a robbery
safes 16 stores Safe positions by shop id
cases vangelico_rockford Display cases: positions, loot table, values, cooldown
registerModels, safeModels, caseModels see file Props that get np_menu options
anims see file Register, safe and case animations