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 flow can be triggered externally, from an item, a phone app or a mission script:

---@param targetPlayerServerId? number  defaults to the triggering player
TriggerServerEvent('rm_chopshop:server:createJob', targetPlayerServerId, {
    ignorePoliceCount    = false,
    ignorePlayerCooldown = false,
    ignoreGlobalCooldown = false,
    ignoreLockdown       = false,
})

The options table is optional; every flag defaults to false. Server-side, TriggerEvent works the same way, and cancelling mirrors it:

TriggerEvent('rm_chopshop:server:cancelJob', playerId)

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

Lockdown

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

While lockdown is active, new jobs are refused with a notification, so you can pause the job during events or police raids.

Server hook: parts on the rack

rm_chopshop/server/editable_functions.lua ships open with a commented example:

Client hook: part dismantled

rm_chopshop/client/events.lua is an open file with a ready handler:

Discord logging

Job starts/finishes/cancels and every shop transaction route through rm_chopshop/server/discord_log.lua, an open file you can rewrite entirely. Logging is off by default: set enabled = true and your webhook URL in the file's config to turn it on.