opensource/client/client.lua
This file handles zone creation, drawtext, evidence, stress, the fixer dialog, and the minigame callback. If you want to change the minigames used for each step, this is the only file you need to edit.Minigame Callback
Each lock and crate triggers theprojectx-containerrobbery:client:Minigames callback with its Minigame step name from the config. You can swap any minigame by replacing the export call inside the matching elseif block.
You can return
true unconditionally inside any step block to skip that minigame entirely. This can be useful for testing or for steps you want to make automatic.With
Config.Cutter.Enabled = true (the default), locks use the built-in grinder and bypass UIs tuned in Config.Cutter.Locks instead of the lock minigames above.Fixer Dialog
ShowDialog(data) opens the fixer conversation with projectx-ui when Config.Dialog = "projectx". AlertDialog(data) is used for Config.Dialog = "ox", or as a fallback when projectx-ui isn’t started. You can replace either function to use your own dialog UI.
opensource/server/server.lua
This file handles dispatch, item/money functions, logging, the admin command, and exposes several hooks you can use to run custom logic at specific points in the robbery.Inventory Helpers
HasItemAmount(source, item, amount)
HasItemAmount(source, item, amount)
Checks that the player has at least
amount of an item. Used for the fixer’s item price. Supports ox_inventory and qb-inventory out of the box. Add your inventory here if it isn’t listed, otherwise only “has at least one” is checked.ItemLabel(item)
ItemLabel(item)
Returns the item label used in notifications (e.g. “Your X Grinder broke”). Reads from
ox_inventory if available, otherwise returns the item name.RewardNotDelivered(source, item, amount)
RewardNotDelivered(source, item, amount)
Called when a reward didn’t fit in the player’s inventory. Return
true if you put it somewhere (the player is told it fell on the ground), or false to tell them their pockets are full. By default, it’s dropped at their feet with ox_inventory.Hooks
SuccessfulStep(source, step)
SuccessfulStep(source, step)
Called whenever a player successfully completes a step.
step is "Container" or "Crate".FailedStep(source, step)
FailedStep(source, step)
Called whenever a player fails a step, e.g.
"Padlock", "Reinforced", "Electronic", "Hack", "GunCrate". Use this to remove XP, items, or apply penalties.InitialCheck(src, approach)
InitialCheck(src, approach)
Called before a robbery starts.
approach is "Fixer" for a fixer contract or "Detection" for the loud approach. Return false to block it.RobberyResetHook()
RobberyResetHook()
Called whenever the heist resets.
