Skip to content
Documentation
Robberies5Shop Robbery

r_shoprobbery Configuration

r_shoprobbery config: framework and integrations, money and police, alarms, cameras, customers, the holdup, registers, the safe, shelves, blips, logs and security.

All settings live in shared/config.lua, the stores in shared/config_stores.lua (see Stores). Restart the resource after changing them.

General

R.Framework = 'auto'    -- 'auto' | 'esx' | 'qb' | 'qbox'
R.Inventory = 'auto'    -- 'auto' | 'ox_inventory' | 'qb-inventory' | 'quasar' | 'framework'
R.Target = 'none'       -- 'auto' | 'ox_target' | 'qb-target' | 'none' (key prompt) | 'custom' (edit BridgeCustomTarget in bridge/cl_target.lua)
R.Notify = 'auto'       -- 'auto' | 'ox_lib' | 'esx' | 'qb' | 'okok' | 'quasar' | 'codesign'
R.TextUI = 'gta'     -- 'gta' | 'ox_lib' | 'okok' | 'qb' | 'jg' | 'cd' | 'esx' | 'custom' (edit BridgeTextUI in bridge/cl_textui.lua)
R.Progress = 'rscripts'   -- 'rscripts' | 'gta' | 'ox_lib_bar' | 'ox_lib_circle' | 'qb' | 'esx' | 'progressbars' | 'mythic' | 'custom' (edit BridgeProgress in bridge/cl_progress.lua)
R.Meters = 'rscripts'   -- 'rscripts' | 'gta' | 'custom' (edit BridgeMeters in bridge/cl_meters.lua), the holdup bag and safe clock bars
R.Dispatch = 'auto'     -- 'auto' | 'cd_dispatch' | 'ps-dispatch' | 'qs-dispatch' | 'rcore_dispatch' | 'core_dispatch' | 'tk_dispatch' | 'lb-tablet' | 'linden' | 'op' | 'custom' | 'none'
R.Locale = ''           -- '' = ox:locale convar, or 'en' / 'fi'
R.Debug = false

R.UI = {
    Accent = '#9a27ea',
}

Prompt, bars and custom target

R.Target = 'none' shows a key prompt at the register, safe and shelves. R.TextUI picks how that prompt looks. For custom, edit BridgeTextUI in bridge/cl_textui.lua.

R.Progress is the bar while you pick a register, empty the safe or search a shelf. R.Meters is the holdup bag, the safe clock and the clerk's eye while you shoplift. 'rscripts' shows pills at the bottom of the screen in your Accent colour, 'gta' shows GTA's timer bars. For 'custom', fill in BridgeMeters.Show(bars) and BridgeMeters.Hide() in bridge/cl_meters.lua. Each bar has label, value (0-1), warn and icon.

R.Target = 'custom' is for any other target script: fill in BridgeCustomTarget in bridge/cl_target.lua. The bridge/ folder is open, so you can edit it freely.

Money and police

R.Money = {
    dirty = false,          -- true = pay every cash reward as dirty money
    dirtyItem = 'auto',     -- 'auto' = ESX black_money, qb-inventory markedbills, ox/qs black_money item, or an item name
}

R.Police = {
    jobs = { 'police', 'sheriff' },
    onDutyOnly = true,
    canRob = false,         -- false = police (the jobs above) can't rob stores
}

jobs and onDutyOnly decide who counts as police, both for the police count each part needs and for canRob. With onDutyOnly = true, an off-duty officer counts as a civilian and can rob.

Alarms

R.Alarm = {
    delay = { 5, 20 },      -- seconds before the police get the call
    cooldown = 180,         -- seconds before the same store can call again
    failChance = 50,        -- % a failed minigame calls the police
    sound = true,
    soundDuration = 45,
    soundBank = 'ALARM_BELL_02',
    soundName = 'Bell_02',
    soundSet = 'ALARMS_SOUNDSET',
    blip = { sprite = 52, colour = 1, scale = 1.2, time = 90 },
    describe = true,        -- the call tells the police the robber's gender, mask or no mask, and if the cameras caught them
    notMasks = {            -- mask slot drawables that leave the face visible
        male = { 121 },
        female = {},
    },
}

Each part has its own alarmChance. A failed skill check or safe rolls failChance. The call goes to R.Dispatch after delay seconds, and a store calls at most once every cooldown seconds. The bell rings in the store for soundDuration seconds.

With describe = true, the call adds the robber's description, for example Suspect: male, no mask. Face on camera.

Anything in the mask slot counts as a mask. If your clothing packs put scarves or other items there, list those drawables in notMasks, or edit IsMasked in client/cl_custom.lua.

Cameras

R.Cameras = {
    enabled = true,         -- shoot the store's cameras before you rob it
    models = { 'prop_cctv_cam_06a', 'prop_cctv_02_sm', 'prop_cctv_cam_01a', 'prop_cctv_cam_01b', 'prop_cctv_cam_02a', 'prop_cctv_cam_03a', 'prop_cctv_cam_04a', 'prop_cctv_cam_05a', 'prop_cctv_cam_07a' },
    alarmBonus = 15,        -- % added to every alarm roll while the cameras work
    repair = 15,            -- minutes before shot cameras work again
}

The store's own ceiling cameras can be shot. They spark, go dark for everyone and work again after repair minutes. While at least one camera works, every alarm roll gets alarmBonus added and the description says the robber is on camera. With every camera down it says Cameras were down.

Customers

R.Customers = {
    enabled = true,         -- a customer who happens to be in the store may jump a robber busy at a register or the safe (none are spawned)
    chance = 35,            -- % per register or safe
    delay = { 2, 5 },       -- seconds into the robbery before they step in, never while a gun is out
    fightTime = 25,         -- seconds before they give up, pulling a gun or leaving the store ends it sooner
}

Nothing is spawned. If a local happens to be standing in the store when someone starts on a register or the safe, they may step in a few seconds later and fight with their fists. A hit stops what the robber is doing. They never jump a robber with a gun out, and they run as soon as one is pulled.

Limits and security

R.Limits = {
    maxActiveStores = 3,    -- stores that can be robbed at the same time
    activeWindow = 10,      -- minutes a store counts as active after the last action
}

R.Security = {
    interactDistance = 2.5,
    requestCooldown = 500,  -- ms
}

Holdup

R.Holdup = {
    enabled = true,
    police = 0,
    cooldown = 30,          -- minutes
    clerkModel = 'mp_m_shopkeep_01',
    clerkScenario = 'WORLD_HUMAN_STAND_IMPATIENT',
    spawnDistance = 40.0,
    aimDistance = 8.0,
    aimTime = 0.6,          -- seconds of aiming before the clerk gives in
    duration = 20,          -- seconds of aiming to fill the bag
    panicAfter = 4,         -- seconds without a gun on the clerk before the alarm
    maxDistance = 12.0,
    bagTime = 60,           -- seconds the bag waits on the counter
    cowerTime = 90,
    alarmChance = 40,       -- % the clerk still hits the silent alarm
    hurry = {
        enabled = true,     -- shooting near the clerk makes them fill the bag faster
        boost = 0.75,       -- +75 % speed
        time = 3,           -- seconds each shot keeps them hurrying
        alarmChance = 15,   -- % each shot also calls the police
    },
    safeCodeChance = 35,    -- % the clerk gives up the safe code
    safeCodeTime = 10,      -- minutes
    reward = {
        money = { 800, 2200 },
        items = {},         -- { name = 'item', amount = { 1, 2 }, chance = 50 }, every item rolls its own %
    },
}

Aim a gun at the clerk for aimTime seconds and they start filling the bag. Keep aiming: the bag fills over duration seconds and stops while you look away. After panicAfter seconds without a gun on them, the clerk hits the alarm and the holdup is over. Shooting near the clerk makes them hurry.

When the bag is full, the clerk tosses it over the counter. Only the robber can pick it up, within bagTime seconds. The clerk then cowers for cowerTime seconds, and with safeCodeChance they also whisper the safe code.

Registers

R.Registers = {
    enabled = true,
    police = 0,
    cooldown = 20,          -- minutes
    alarmChance = 35,
    models = { 'prop_till_01', 'prop_till_02', 'prop_till_03', 'p_till_01_s' },
    methods = {
        lockpick = {
            item = 'lockpick',
            breakChance = 35,
            duration = 8,
            skillCheck = { 'easy', 'easy', 'medium' },
        },
        crowbar = {
            weapon = 'WEAPON_CROWBAR',
            duration = 5,
            alarmBonus = 25,
            skillCheck = { 'easy', 'medium' },
        },
    },
    reward = {
        money = { 250, 650 },
        items = {},         -- { name = 'item', amount = { 1, 2 }, chance = 50 }
    },
}

The crowbar method needs the crowbar in your hands and leaves the register smashed until the cooldown ends. The skill check is lib.skillCheck. Swap it for your own in SkillCheck in client/cl_custom.lua.

Safe

R.Safe = {
    enabled = true,
    police = 0,
    cooldown = 45,          -- minutes
    alarmChance = 60,
    item = false,           -- item needed to try, false = none
    models = { 'v_ilev_gangsafe', 'v_ilev_gangsafedial', 'v_ilev_gangsafedoor', 'prop_ld_int_safe_01', 'p_v_43_safe_s', 'prop_night_safe_01' },
    prop = 'h4_prop_h4_safe_01a',       -- placed at safeProp in config_stores.lua, false = none
    propOpen = 'h4_prop_h4_safe_01b',   -- the same safe with its door open
    pins = 3,
    tolerance = 3,          -- numbers you may turn past the click and still confirm
    hint = true,            -- the lock lights up when it clicks
    mistakes = 3,
    timeLimit = 90,         -- seconds, 0 = no limit
    duration = 8,
    codeDuration = 4,
    reward = {
        money = { 2500, 6000 },
        items = {},         -- { name = 'item', amount = { 1, 2 }, chance = 50 }
    },
}

Turn the dial with A and D (hold Shift to spin faster). When it clicks, press E and the direction flips. With the clerk's code it opens in codeDuration seconds without the minigame. To use your own minigame, edit SafeMinigame in client/cl_custom.lua.

Stores with a safeProp get a prop safe at that spot. Its door swings open when the dial is solved and stays open until the cooldown ends. prop needs game build 2189 or newer. On an older build the store keeps the plain interaction at safe.

Shelves

R.Shelves = {
    enabled = true,
    police = 0,
    cooldown = 10,          -- minutes
    alarmChance = 10,
    duration = 5,
    maxPerStore = 4,
    skillCheck = { 'easy' },
    clerk = {
        enabled = true,     -- the clerk fights shoplifters they see, they never leave the store
        seeTime = 3.5,      -- seconds in the clerk's view before they notice (close by it fills faster)
        distance = 10.0,
        cone = 55,          -- degrees to each side of where the clerk faces
        crouch = 0.5,       -- fill speed while sneaking (crouched)
        phone = { 6, 10 },  -- seconds the clerk is on the phone and sees nothing
        watch = { 6, 12 },  -- seconds the clerk watches the store between calls
        fightTime = 25,     -- seconds they keep swinging, leaving the store or pulling a gun ends it sooner
        alarmChance = 20,   -- % they also call the police
    },
    models = {
        'v_ret_247shelves01', 'v_ret_247shelves02', 'v_ret_247shelves03', 'v_ret_247shelves04', 'v_ret_247shelves05',
        'v_ret_ml_liqshelfa', 'v_ret_ml_liqshelfb', 'v_ret_ml_liqshelfc', 'v_ret_ml_liqshelfd', 'v_ret_ml_liqshelfe',
    },
    loot = {                -- per store type, every item rolls its own %
        ['247'] = {
            { name = 'water', amount = { 1, 2 }, chance = 50 },
            { name = 'burger', amount = { 1, 1 }, chance = 35 },
            { name = 'sprunk', amount = { 1, 2 }, chance = 35 },
            { name = 'bandage', amount = { 1, 1 }, chance = 20 },
        },
        ltd = {
            { name = 'sprunk', amount = { 1, 2 }, chance = 50 },
            { name = 'water', amount = { 1, 2 }, chance = 40 },
            { name = 'mustard', amount = { 1, 1 }, chance = 30 },
            { name = 'bandage', amount = { 1, 1 }, chance = 20 },
        },
        liquor = {
            { name = 'sprunk', amount = { 1, 3 }, chance = 60 },
            { name = 'water', amount = { 1, 2 }, chance = 40 },
            { name = 'burger', amount = { 1, 1 }, chance = 30 },
        },
    },
}

Every store type has its own loot list in loot. Use items your server has.

While you search a shelf, the clerk can see you if you are in front of them (cone degrees to each side, up to distance metres) with nothing in between. The eye bar fills over seeTime seconds, faster up close and at crouch speed while sneaking. Every few seconds the clerk takes out a phone for phone seconds and sees nothing. Get seen and the clerk fights you for fightTime seconds. They never leave the store, and pulling a gun on them starts a holdup.

Blips, admin and logs

R.Blips = {
    enabled = false,
    sprite = 52,
    colour = 2,
    scale = 0.6,
}

R.Admin = {
    command = 'shoprobbery',
    group = { 'group.admin', 'group.god' },
}

R.Logs = {
    enabled = true,
    type = 'webhook',       -- 'webhook' (set it in server/sv_custom.lua) | 'ox_lib'
    showIp = false,
}

R.Blips.enabled = true puts a blip on every store. To show only some, set blip = true on those stores in shared/config_stores.lua. The admin command is on the Exports page.