Skip to content

Configuration

All configuration for sd-pacificbank is split across two files:

  • config.lua -- Main configuration (general settings, items, police alert, locations, hacking minigames, drill settings, rewards, lasers, guards, and guard loot)
  • server/logs.lua -- Logging configuration (service selection, event toggles, and webhook/API settings)

Locale

The locale is loaded at the top of config.lua:

lua
SD.Locale.LoadLocale('en')

Change the string to load a different language. Locale files are stored in the locales/ directory.

General Settings

lua
Config.PacificDebug = false
Config.MinimumPolice = 3
Config.PoliceJobs = { 'police', --[['sheriff']] }
Config.DoorLock = 'ox'
Config.Cooldown = 120
KeyTypeDefaultDescription
Config.PacificDebugbooleanfalseEnable PolyZone debug visualizations for testing. Some targeting solutions (e.g. ox_target) may not display them
Config.MinimumPolicenumber3Minimum number of police online to start the heist
Config.PoliceJobstable{ 'police' }Array of job names that count toward the police requirement. Uncomment 'sheriff' or add others as needed
Config.DoorLockstring'ox'Door lock system to use: 'ox', 'qb', or 'nui'
Config.Cooldownnumber120Global cooldown in minutes between heists

Items

lua
Config.Items = {
    ComputerHack = 'laptop_pink',
    TerminalHack = 'laptop_gold',
    Drill = 'large_drill',
    Thermite = 'thermite',
    Bomb = 'c4_bomb'
}
KeyTypeDefaultDescription
ComputerHackstring'laptop_pink'Item required for hacking office computers
TerminalHackstring'laptop_gold'Item required for hacking door consoles/terminals
Drillstring'large_drill'Item required for drilling deposit boxes
Thermitestring'thermite'Item required for thermite breaching doors
Bombstring'c4_bomb'Item required for the vault bomb

TIP

Change the item names to match whatever items exist in your server's inventory system. Ensure all five items are registered and obtainable by players.

Police Alert

The policeAlert function is called when the heist begins and police are notified. It uses SD.PoliceDispatch and can be customized freely.

lua
policeAlert = function()
    SD.PoliceDispatch({
        displayCode = "10-31P",
        title = 'Pacific Bank Heist',
        description = "Pacific Bank Heist in progress",
        message = "Multiple suspects reported inside Pacific Bank",
        sprite = 108,
        scale = 1.0,
        colour = 1,
        blipText = "Pacific Bank Heist",
        dispatchcodename = "pacific_bank_heist"
    })
end
KeyTypeDefaultDescription
displayCodestring"10-31P"Dispatch code displayed to officers
titlestring'Pacific Bank Heist'Title used in cd_dispatch/ps-dispatch
descriptionstring"Pacific Bank Heist in progress"Description of the dispatch call
messagestring"Multiple suspects reported inside Pacific Bank"Additional message or information
spritenumber108Blip sprite icon on the map
scalenumber1.0Blip size on the map
colournumber1Blip color on the map
blipTextstring"Pacific Bank Heist"Text that appears on the blip
dispatchcodenamestring"pacific_bank_heist"Code name used by ps-dispatch in sv_dispatchcodes.lua or config.lua under Config.Blips

INFO

The blip settings (sprite, scale, colour, blipText) are used for all dispatch systems except ps-dispatch. For ps-dispatch, configure the blip via dispatchcodename in your ps-dispatch config.

Item Removal Chances

Controls whether items are consumed after use and the probability of removal.

lua
Config.RemoveItemOnUse = true
Config.RemoveItemChanceUse = 35

Config.RemoveDrillOnSuccess = false
Config.RemoveDrillChanceSuccess = 15

Config.RemoveDrillOnFail = true
Config.RemoveDrillChanceFail = 15
KeyTypeDefaultDescription
Config.RemoveItemOnUsebooleantrueRemove the hacking item (laptop) on successful hack
Config.RemoveItemChanceUsenumber35Percentage chance to remove the item on successful use
Config.RemoveDrillOnSuccessbooleanfalseRemove the drill on successful deposit box drilling
Config.RemoveDrillChanceSuccessnumber15Percentage chance to remove the drill on success
Config.RemoveDrillOnFailbooleantrueRemove the drill on a failed drilling minigame
Config.RemoveDrillChanceFailnumber15Percentage chance to remove the drill on failure

TIP

Setting RemoveItemOnUse to true with RemoveItemChanceUse at 35 means there is a 35% chance the laptop is consumed after each successful hack. Set the chance to 100 for guaranteed removal, or 0 to never remove.

Computer & Console Locations

These define the target interaction positions for each stage of the heist.

Office Computers

The four office computers that players hack to receive vault code fragments:

lua
Config.Computer1Location = vector3(261.75, 234.91, 109.44) -- First Office
Config.Computer2Location = vector3(270.28, 231.75, 109.34) -- Second Office
Config.Computer3Location = vector3(260.63, 205.57, 109.31) -- Third Office
Config.Computer4Location = vector3(252.05, 208.86, 109.3)  -- Fourth Office

Password Input

The laptop in the main office where players enter the combined vault code:

lua
Config.InputPassword = vector3(278.95, 213.06, 109.43)

Door Consoles

Hackable consoles that open doors in the vault area:

lua
-- First two doors to enter the vault area
Config.DoorConsole1 = { pos = vector3(270.59, 221.26, 96.6), hacked = false }
Config.DoorConsole2 = { pos = vector3(267.43, 213.28, 96.6), hacked = false }

-- Doors for each side room
Config.DoorConsole3 = { pos = vector3(247.48, 233.82, 96.6), hacked = false }
Config.DoorConsole4 = { pos = vector3(241.7, 218.64, 96.61), hacked = false }

-- Console inside the vault
Config.DoorConsole5 = { pos = vector3(227.93, 228.5, 96.71), hacked = false }

Thermite Doors

Doors in the middle of the vault area that require thermite to breach:

lua
Config.ThermiteDoor1 = { pos = vector3(251.96, 216.95, 96.45), open = false }
Config.ThermiteDoor2 = { pos = vector3(256.07, 228.2, 96.36), open = false }

Vault Door

lua
Config.VaultDoor = vector3(235.52, 229.52, 97.65)

WARNING

Do not change the hacked or open default values. These are runtime state flags that the script manages internally. Only modify the pos coordinates if you need to adjust interaction positions.

Password Attempts

lua
Config.UseChatMessages = false
Config.PasswordAttempts = 3
KeyTypeDefaultDescription
Config.UseChatMessagesbooleanfalsetrue = display vault codes in chat; false = display codes as notifications
Config.PasswordAttemptsnumber3Number of attempts players have to enter the correct vault code before lockout

Bank Zone

Defines the area encompassing the entire Pacific Bank, used for proximity checks:

lua
Config.Points = {
    pacific = {
        coords = vector3(253.38, 228.38, 101.68),
        distance = 35.0,
    }
}
KeyTypeDefaultDescription
coordsvector3253.38, 228.38, 101.68Approximate center of the bank
distancenumber35.0Effective radius of the zone

Hacking Minigames

Each hacking stage (Computer, Terminal, Thermite) has its own independent minigame configuration. Set the Minigame key to your preferred minigame, then configure its arguments in the Args table.

lua
Config.Hacking = {
    Computer = {
        Minigame = 'hacking-opengame',
        Args = { ... }
    },
    Terminal = {
        Minigame = 'ps-varhack',
        Args = { ... }
    },
    Thermite = {
        Minigame = 'ps-thermite',
        Args = { ... }
    },
}
StageDefault MinigameDescription
Computer'hacking-opengame'Minigame used when hacking office computers for vault codes
Terminal'ps-varhack'Minigame used when hacking door console terminals
Thermite'ps-thermite'Minigame used when placing thermite on doors

Supported Minigames

Each stage supports the same set of minigames. Set the Minigame value to any key listed below, and the matching Args entry will be used automatically:

ResourceMinigame KeyDefault ArgsDescription
ps-uips-circle{2, 20}Number of circles, time in ms
ps-uips-maze{20}Time in seconds
ps-uips-varhack{2, 3}Number of blocks, time in seconds
ps-uips-thermite{10, 5, 3}Time in seconds, grid size, incorrect blocks
ps-uips-scrambler{'numeric', 30, 0}Type, time in seconds, mirrored option
memorygamememorygame-thermite{10, 3, 3, 10}Correct blocks, incorrect blocks, show time (s), lose time (s)
ran-minigamesran-memorycard{120} (Computer) / {360} (Terminal/Thermite)Time in seconds
ran-minigamesran-openterminal{}No additional arguments
hackinghacking-opengame{15, 4, 1}Time in seconds, number of blocks, number of repeats
howdy-hackminigamehowdy-begin{3, 5000}Number of icons, time in ms
SN-Hackingsn-memorygame{3, 2, 10000}Keys needed, number of rounds, time in ms
SN-Hackingsn-skillcheck{50, 5000, {'w','a','s','w'}, 2, 20, 3}Speed (ms), time (ms), keys, rounds, bars, safe bars
SN-Hackingsn-thermite{7, 5, 10000, 2, 2, 3000}Boxes, correct boxes, time (ms), lives, rounds, show time (ms)
SN-Hackingsn-keypad{999, 3000}Code number, time in ms
SN-Hackingsn-colorpicker{3, 7000, 3000}Icons, type time (ms), view time (ms)
rm_minigamesrm-typinggame{'easy', 20}Difficulty, duration in seconds
rm_minigamesrm-timedlockpick{200}Speed value
rm_minigamesrm-timedaction{3}Number of locks
rm_minigamesrm-quicktimeevent{'easy'}Difficulty
rm_minigamesrm-combinationlock{'easy'}Difficulty
rm_minigamesrm-buttonmashing{5, 10}Decay rate, increment rate
rm_minigamesrm-angledlockpick{'easy'}Difficulty
rm_minigamesrm-fingerprint{200, 5}Time in seconds, number of lives
rm_minigamesrm-hotwirehack{10}Time in seconds
rm_minigamesrm-hackerminigame{5, 3}Length, number of lives
rm_minigamesrm-safecrack{'easy'}Difficulty

TIP

You can use a different minigame for each stage. For example, use hacking-opengame for computers, ps-varhack for terminals, and ps-thermite for thermite -- each has independent difficulty tuning via its Args entry.

Drill Settings

Controls item consumption behavior for the deposit box drilling minigame:

lua
Config.RemoveDrillOnSuccess = false
Config.RemoveDrillChanceSuccess = 15

Config.RemoveDrillOnFail = true
Config.RemoveDrillChanceFail = 15
KeyTypeDefaultDescription
Config.RemoveDrillOnSuccessbooleanfalseRemove the drill item after successfully drilling a deposit box
Config.RemoveDrillChanceSuccessnumber15Percentage chance to remove the drill on success
Config.RemoveDrillOnFailbooleantrueRemove the drill item after failing the drilling minigame
Config.RemoveDrillChanceFailnumber15Percentage chance to remove the drill on failure

Tray Rewards

Cash trays are spawned in the vault area. Each tray contains money bags or gold bars.

lua
Config.Rewards = {
    Trays = {
        MaxTrayAmount = 10,
        MinTrayAmount = 9,
        MoneyWorth = { Min = 20000, Max = 30000 },
        MoneyBagAmount = { Min = 1, Max = 2 },
        GoldChance = 35,
        GoldAmount = { Min = 3, Max = 6 },
    },
}
KeyTypeDefaultDescription
MaxTrayAmountnumber10Maximum number of trays that will spawn. Cannot exceed the number of entries in Config.Trays
MinTrayAmountnumber9Minimum number of trays that will spawn
MoneyWorthtable{ Min = 20000, Max = 30000 }Dollar value range per money tray
MoneyBagAmounttable{ Min = 1, Max = 2 }Number of money bag items received per tray. Total value = MoneyWorth x MoneyBagAmount
GoldChancenumber35Percentage chance for a tray to contain gold bars instead of cash
GoldAmounttable{ Min = 3, Max = 6 }Number of gold bars received per gold tray

INFO

There are 10 tray spawn positions defined in Config.Trays -- 4 in the two side rooms, 2 in the main vault, and 4 behind locked doors inside the vault. MaxTrayAmount should not exceed 10 unless you add more positions.

Deposit Box Rewards

Deposit boxes require drilling and yield random loot items. Each box has a set number of loot times (drill attempts available).

lua
Config.Rewards.DepositBoxes = {
    MinAmountToGive = 2,
    MaxAmountToGive = 5,
    Items = {
        ["diamond"] = { MinAmount = 2, MaxAmount = 3, Chance = 20 },
        ["diamond_ring"] = { MinAmount = 2, MaxAmount = 5, Chance = 25 },
        ["10kgoldchain"] = { MinAmount = 3, MaxAmount = 5, Chance = 25 },
    },
}
KeyTypeDefaultDescription
MinAmountToGivenumber2Minimum total number of different items given per loot
MaxAmountToGivenumber5Maximum total number of different items given per loot
ItemstableSee aboveLoot pool with item name as key; each entry has MinAmount, MaxAmount, and Chance (percentage)

Default Deposit Box Loot

ItemMin AmountMax AmountChance
diamond2320%
diamond_ring2525%
10kgoldchain3525%

Deposit Box Locations

There are 6 deposit box locations defined in Config.DepositBoxes:

BoxAreaLoot Times
1Side Room2
2Side Room3
3Side Room2
4Side Room3
5Inside Vault5
6Inside Vault5

TIP

LootTimes controls how many times a deposit box can be drilled during a single heist. Vault boxes have more loot attempts than side room boxes.

Cash Payout Mode

Controls how cash rewards from trays are distributed to players.

lua
Config.CashoutType = 'dirty'
KeyTypeDefaultDescription
Config.CashoutTypestring'dirty'Payout mode: 'clean', 'dirty', or 'custom'
ModeBehavior
'clean'Distributes unmarked (clean) cash directly
'dirty'Distributes marked bills with a worth value, or dirty_money as 1:1 for ESX
'custom'Distributes a custom item as currency (see below)

Custom Cash Mode

When Config.CashoutType is set to 'custom', an additional table becomes available:

lua
Config.CustomCash = {
    CashItem = 'markedbills',
    CashQuantity = false,
    CashAmount = { min = 1, max = 2 },
}
KeyTypeDefaultDescription
CashItemstring'markedbills'Item identifier used as currency. Replace with your server's actual item name
CashQuantitybooleanfalsefalse = each item represents $1 (quantity determined by Config.Rewards). true = the number of items given equals CashAmount, where each item has its own server-defined worth
CashAmounttable{ min = 1, max = 2 }Number of CashItem given when CashQuantity = true

INFO

If you use base ESX with dirty_money where each unit equals $1, use 'dirty' mode rather than 'custom'. The 'custom' mode is intended for servers where a single item (like markedbills) represents a larger denomination (e.g. $5,000 each).

Laser Grid

lua
Config.EnableLasers = true
Config.LaserResourceName = 'mka-lasers'
Config.CheckForBlackout = false
KeyTypeDefaultDescription
Config.EnableLasersbooleantrueEnable the laser grid system in the vault room
Config.LaserResourceNamestring'mka-lasers'Name of the laser resource. The script checks this resource is running before activating lasers
Config.CheckForBlackoutbooleanfalseWhen true, if a blackout is active (via qb-weathersync), lasers will not start after the password is entered and thermite doors can be skipped

WARNING

If Config.EnableLasers is true, ensure the resource specified in Config.LaserResourceName is installed and started on your server. If the resource is not found, lasers will not function.

Blackout Integration

lua
Config.CheckForBlackout = false

When enabled, the script checks for an active blackout event (using qb-weathersync). During a blackout:

  • Lasers will not activate after the vault password is entered
  • Thermite doors can be skipped entirely

This provides an alternative heist path that bypasses laser and thermite stages.

Guards

Guard Toggle

lua
Config.EnableGuards = true
Config.EnableLooting = true
KeyTypeDefaultDescription
Config.EnableGuardsbooleantrueSpawn NPC guards during the Pacific Bank heist
Config.EnableLootingbooleantrueAllow players to loot dead guards

Guard Parameters

lua
Config.PedParameters = {
    Ped = "s_m_m_security_01",
    Health = 200,
    Weapon = {"WEAPON_PISTOL", "WEAPON_SMG", "WEAPON_ASSAULTRIFLE"},
    MinArmor = 50,
    MaxArmor = 100,
    Headshots = true,
    CombatAbility = 100,
    Accuracy = 60,
    CombatRange = 2,
    CombatMovement = 2,
    CanRagdoll = true,
}
KeyTypeDefaultDescription
Pedstring"s_m_m_security_01"Ped model used for guards
Healthnumber200Maximum and initial health of each guard
Weapontable{"WEAPON_PISTOL", "WEAPON_SMG", "WEAPON_ASSAULTRIFLE"}List of weapons guards may carry (randomized per guard)
MinArmornumber50Minimum armor value a guard can have
MaxArmornumber100Maximum armor value a guard can have
HeadshotsbooleantrueWhether guards can suffer critical hits (headshots)
CombatAbilitynumber100Combat ability rating (0-100, where 100 is highest)
Accuracynumber60Shot accuracy (0-100, where 100 is highest)
CombatRangenumber2Combat engagement range: 0 = short, 1 = medium, 2 = long
CombatMovementnumber2Combat movement style: 0 = calm, 1 = normal, 2 = aggressive
CanRagdollbooleantrueWhether guards can be ragdolled from player impact

Guard Spawn Locations

Guards spawn in the vault basement area. There are 10 spawn positions defined in Config.Guards:

lua
Config.Guards = {
    {
        coords = {
            vector4(257.97, 214.94, 97.12, 311.59),
            vector4(255.25, 221.25, 97.12, 252.08),
            vector4(256.72, 224.23, 97.12, 244.81),
            vector4(263.59, 226.21, 97.12, 167.98),
            vector4(249.67, 218.95, 97.12, 327.85),
            vector4(251.46, 230.91, 97.12, 212.82),
            vector4(247.55, 227.88, 97.12, 240.08),
            vector4(246.09, 223.56, 97.12, 260.39),
            vector4(239.18, 220.99, 97.12, 310.68),
            vector4(243.1, 230.39, 97.12, 212.91),
        }
    },
}

Each entry is a vector4 with x, y, z coordinates and heading.

Guard Loot

When Config.EnableLooting is true, dead guards can be looted for weapons, ammo, and medical supplies.

lua
Config.PedRewards = {
    weaponChance = 60,
    itemRange = { min = 2, max = 3 },
    PistolRewards = {
        items = {"weapon_heavypistol", "weapon_pistol", "weapon_pistol_mk2"},
        chance = 37,
        isGunReward = true,
    },
    RareRewards = {
        items = {"weapon_assaultrifle", "weapon_compactrifle", "weapon_mg"},
        chance = 15,
        isGunReward = true,
    },
    SMGRewards = {
        items = {"weapon_assaultsmg", "weapon_minismg", "weapon_combatpdw"},
        chance = 32,
        isGunReward = true,
    },
    ShotgunRewards = {
        items = {"weapon_sawnoffshotgun", "weapon_pumpshotgun", "weapon_dbshotgun"},
        chance = 25,
        isGunReward = true,
    },
    AmmoRewards = {
        items = {"pistol_ammo", "shotgun_ammo", "rifle_ammo", "smg_ammo"},
        chance = 45,
        amount = { min = 1, max = 2 },
    },
    MedicRewards = {
        items = {"bandage"},
        chance = 45,
        amount = { min = 1, max = 2 },
    },
}

Global Loot Settings

KeyTypeDefaultDescription
weaponChancenumber60Overall percentage chance of receiving any gun-related reward from a loot
itemRangetable{ min = 2, max = 3 }Minimum and maximum number of items a player can receive from each loot

Reward Categories

CategoryItemsChance (Weight)Gun Reward
PistolRewardsweapon_heavypistol, weapon_pistol, weapon_pistol_mk237Yes
RareRewardsweapon_assaultrifle, weapon_compactrifle, weapon_mg15Yes
SMGRewardsweapon_assaultsmg, weapon_minismg, weapon_combatpdw32Yes
ShotgunRewardsweapon_sawnoffshotgun, weapon_pumpshotgun, weapon_dbshotgun25Yes
AmmoRewardspistol_ammo, shotgun_ammo, rifle_ammo, smg_ammo45No
MedicRewardsbandage45No

INFO

The chance values are weights, not strict percentages -- they indicate relative likelihood compared to other categories. A category with chance 45 is roughly three times as likely to be selected as one with chance 15.

WARNING

Only one item from categories marked isGunReward = true can be selected per loot. Even if itemRange allows 3 items, at most one will be a weapon. Non-gun categories (AmmoRewards, MedicRewards) can each contribute items independently. To allow multiple weapons per loot, set isGunReward = false on additional weapon categories.

Ammo and Medic Amounts

CategoryMin AmountMax Amount
AmmoRewards12
MedicRewards12

Logging

Logging is configured in server/logs.lua. It controls which events are recorded and where logs are sent.

lua
return {
    logs = {
        service = 'none',
        dataset = 'sd-pacificbank',
        screenshots = false,
        events = {
            tray_loot   = true,
            give_loot   = true,
            reward_ped  = true,
            remove_item = true,
        },
        discord = { ... },
        loki = { ... },
        grafana = { ... },
    },
}

Logging Service

KeyTypeDefaultDescription
servicestring'none'Logging service to use: 'fivemanage', 'fivemerr', 'discord', 'loki', 'grafana', or 'none'
datasetstring'sd-pacificbank'Fivemanage dataset ID (only used when service is 'fivemanage')
screenshotsbooleanfalseInclude screenshots with logs (only supported by Fivemanage and Fivemerr)

Log Events

EventDefaultDescription
tray_loottrueLog when a player successfully loots a cash tray
give_loottrueLog when a player takes loot from a deposit box
reward_pedtrueLog when a player receives a guard loot reward
remove_itemtrueLog when an item is removed from a player's inventory

Discord Webhook

Only used when service = 'discord':

lua
discord = {
    name   = 'Pacific Bank Logs',
    link   = '',
    image  = '',
    footer = '',
},
KeyTypeDefaultDescription
namestring'Pacific Bank Logs'Webhook display name
linkstring''Discord webhook URL
imagestring''Webhook avatar image URL
footerstring''Webhook footer icon URL

Loki

Only used when service = 'loki':

lua
loki = {
    endpoint = '',
    user     = '',
    password = '',
    tenant   = '',
},
KeyTypeDefaultDescription
endpointstring''Base URL without trailing slash (e.g. 'https://loki.example.com')
userstring''Basic auth username (optional)
passwordstring''Basic auth password or API key (optional)
tenantstring''X-Scope-OrgID header value (optional)

Grafana

Only used when service = 'grafana':

lua
grafana = {
    endpoint = '',
    apiKey   = '',
    tenant   = '',
},
KeyTypeDefaultDescription
endpointstring''Base URL without trailing slash (e.g. 'https://logs-prod.grafana.net')
apiKeystring''Grafana API key (prefixed with 'Bearer ')
tenantstring''X-Scope-OrgID header value (optional)