Skip to main content
Called on the server every time a player tries to use a heist step (open a safe, hack a panel, grab a trolley, shoot a display case…), after the heist checks (police, cooldowns) and before anything happens. Return false and the step is refused: nothing is used, no item is taken and the heist doesn’t start. It’s the place to plug in a party, gang or group script: allow a heist only to a registered party, or require a minimum number of members to start it.
Function
The function is at the bottom of integrations/sv_integrations.lua, edit it there. If you updated from an older version and kept your own sv_integrations.lua, paste it at the bottom of the file: without it every step is allowed, as before.

Parameters

Return value

true to let the player use the step, false to refuse it. When you refuse it, tell the player why: the script shows nothing on its own.

Example

notify(playerId, text) is the notification of the script, you can use it in this file.
The police count and the cooldowns are checked before your function. The required item of the step is checked right after it: a player without it is still refused, after you allowed them. A lost minigame doesn’t start the heist, so isStarting stays true for the next attempt.

Parties and groups

  • Progression is already shared. A heist’s progress belongs to the heist, not to a player: any player can do any step, and a step that’s done (a hacked panel, an opened door, an emptied safe) is done for everyone. Party members can split the work without extra code
  • Rewards go to the player who completes the step. To give something to the rest of the party, listen to the Step completed event: it tells you what the player received
  • Doors Creator doors used in a heist are opened by Robberies Creator itself when the step is completed, so refusing a step here also keeps its doors closed