server.lua
Server-side settings: the queue timers, the cargo payout, completion rewards and the police alerts. Never rename the Config.* keys; only change their values.
Debug
Lua
Config.Debug = true- Description: Enables server-side debug prints to help you track down issues. Set to
falseon a live server.
MaxTaskTime & PersonalCooldownTime
Lua
Config.MaxTaskTime = 20
Config.PersonalCooldownTime = 10- MaxTaskTime: safety cap, in minutes, on a single heist. The slot is force-freed after this so the next queued player can start.
- PersonalCooldownTime: cooldown, in minutes, applied to a player once their heist is processed, before they can join the queue again.
Payout
Lua
Config.Payout = {
type = 'item',
item = 'black_money',
}- Description: How the dynamic cargo payout (the sum of the delivered cargo prices from
Shared.LootProps) is paid on drop-off. - Fields:
- type:
'item'โ paid as an inventory item (theitembelow);'cash'โ paid as clean cash straight to the player's pocket. - item: the inventory item used when
type = 'item'(defaultblack_money).
- type:
Police
Lua
Config.Police = {
callChance = {
pickup = 15, -- ...grabs a loot prop off the train
search = 20, -- ...searches a crate
load = 10, -- ...loads an item into the getaway vehicle
},
cooldownSeconds = 20,
}- Description: Every time a player handles loot there is a chance the cops get tipped off. This applies to anyone touching the loot, even teammates who did not start the heist.
- Fields:
- callChance: chance (0โ100) the police get alerted each time a player does the action โ
pickup,searchorload. - cooldownSeconds: quiet window (seconds) after an alert fires before the same player can trigger another one. Stops a flood of calls when looting fast. Set to
0for an independent roll on every action.
- callChance: chance (0โ100) the police get alerted each time a player does the action โ
TriggerAlarm (server hook)
Lua
function TriggerAlarm(source, coords)
-- TODO implement your police call logic here (server side)
end- Description: Open-function hook called server-side whenever the police actually get alerted (after the chance roll). Plug your own dispatch / alarm logic in here (e.g. ps-dispatch, cd_dispatch, etc.).
sourceis the player who tipped off the cops andcoordsis where they were. You can instead handle alerts client-side inconfigs/client.lua.
CompletionRewards
Lua
Config.CompletionRewards = {
cash = {
enabled = true,
min = 5000,
max = 12000,
},
items = {
enabled = true,
minItems = 1,
maxItems = 3,
pool = {
{ name = "gold_bar", label = "Gold Bar", min = 1, max = 3 },
{ name = "diamond_ring", label = "Diamond Ring", min = 1, max = 2 },
-- ... more items
},
},
}- Description: Rewards granted directly to the player the moment a heist is finished successfully, on top of the dynamic cargo payout calculated from the delivered loot.
- Fields:
- cash: a single random cash amount between
minandmax(setenabled = falseto skip). - items: a random number of different items (between
minItemsandmaxItems), each given in a random quantity between its ownminandmax.- pool: the possible items โ each entry's
min/maxis the random quantity for that item;labelis only used for the notification text (falls back toname).
- pool: the possible items โ each entry's
- cash: a single random cash amount between