STG ScriptsDocumentation
Robbery Pack

Integrations

Connect STG Robbery Pack to your dispatch, vehicle keys, weather sync and notification scripts through shared/functions.lua, and start robberies from your own scripts with exports.

Everything that talks to another script lives in stg-robberypack/shared/functions.lua. The file stays editable in the escrow version, so you can connect any dispatch, key or weather script without touching the rest of the pack. Restart the resource after a change.

Config.Functions = {
    CustomNotify = false,
    Notify = function(type, message) ... end,
    ShowHelpNotify = function(message) ... end,
    HideHelpNotify = function() ... end,
    PauseTimeSync = function(paused) ... end,
    GiveKeys = function(plate, vehicle) ... end,
    IsDown = function() ... end,
    IsCuffed = function() ... end,
    PoliceAlert = function(vehicle, coords) ... end,
}

Prop

Type

Supported out of the box

HookScripts
Dispatchps-dispatch, cd_dispatch, qs-dispatch, linden_outlawalert
Vehicle keysqbx_vehiclekeys, qb-vehiclekeys, qs-vehiclekeys, wasabi_carlock, t1ger_keys, mk_vehiclekeys, cd_garage, vehicles_keys, renzu_vehiclekeys
Time and weather syncRenewed-Weathersync, qb-weathersync, cd_easytime, vSync
Down and cuffed checksqbx_core, qb-core

Your script is not in the list?

It still works. The list above is only what is wired in for you. Any dispatch, vehicle keys or weather script can be added in shared/functions.lua with a few lines, and this file stays open in the escrow version. If you get stuck, open a ticket on our Discord and we will add it for you.

Adding your own script

The first running script is used. To add another one, put its call at the top of the matching function and return after it. Use the export or event from your script's own documentation.

Dispatch

PoliceAlert = function(vehicle, coords)
    if GetResourceState('my-dispatch') == 'started' then
        exports['my-dispatch']:SendAlert({ coords = coords, code = '10-90', title = 'Robbery in progress' })
        return
    end
    -- the supported scripts follow
end,

Vehicle keys

GiveKeys = function(plate, vehicle)
    if GetResourceState('my-keys') == 'started' then
        exports['my-keys']:GiveKeys(plate)
        return
    end
    -- the supported scripts follow
end,

Exports

Server

local ok, err = exports['stg-robberypack']:StartHouseRobbery(source, 'house_name')
exports['stg-robberypack']:HeistAddXp(source, 250)
exports['stg-robberypack']:HeistRemoveXp(source, 50)

Prop

Type

Client

exports['stg-robberypack']:OpenHeistHub()
exports['stg-robberypack']:CloseHeistHub()

local success = exports['stg-robberypack']:StartLockpick('medium', 'door')

exports['stg-robberypack']:CrackSafe(safeEntity)
exports['stg-robberypack']:LootSafe(safeEntity)

Prop

Type

Every robbery spot also has its own client export (HackAtm, BombAtm, SmashAtm, RobMeter, DrillVault, BurnGate, SmashCase, Pickpocket, StartHotwire, StartPlateJob and more). They are what the ox_target options call, so you can attach the same robbery to your own target or key prompt.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page