For the complete documentation index, see llms.txt. This page is also available as Markdown.

Events & Exports

Start a job from your own script

The job can be started externally, from an item, a phone app, or a mission script. Called server-side, it accepts a target player and a table of gates to waive:

---@param targetPlayerServerId? number  defaults to the triggering player
TriggerEvent('rm_banktruck:server:startTrackingTruck', targetPlayerServerId, {
    price                = 0,     -- overrides cfg.prices.locationInfo
    ignorePoliceCount    = false,
    ignorePlayerCooldown = false,
    ignoreLockdown       = false,
    ignoreItemCheck      = false,
})

The options table is optional, and every flag defaults to false. On success, the player gets the truck's location on their GPS for cfg.showLocationDuration minutes, exactly as if they had bought it from the NPC.

Set cfg.disableServerEvent = true if you want this API off entirely.

Lockdown

exports.rm_banktruckrobbery:setLockdown(true) -- true | false | nil (nil toggles)
exports.rm_banktruckrobbery:getLockdown()

While lockdown is active, new jobs are refused with a notification, so you can pause the robbery during events or police raids. Both return the resulting state.

Client hooks

rm_banktruckrobbery/client/editable_functions.lua is an open file with two ready handlers:

Discord logging

Shop purchases and every payout route through rm_banktruckrobbery/server/discord_log.lua, an open file you can rewrite entirely. Logging is off by default: replace WEBHOOK_HERE with your webhook URL in the file's config to turn it on.

The URL lives in that file and not in cfg.lua on purpose. cfg.lua is a shared script, so anything in it is readable by clients.