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.
Clients cannot use the options. The event is also reachable with TriggerServerEvent, but when it arrives from a client both arguments are discarded: it starts the job for the calling player only, with every gate enforced. Without that, any player could trigger it with price = 0 and every flag on.
Call it from a server-side script if you need the options.
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.