Studios
Chop Shophouse-3.jpg

Commands & Exports

SoonChop ShopQBCore · Qbox · ESX
PAGE 06 OF 07  ·  TROUBLESHOOTING → COMMANDS & EXPORTS → LOOT & PERKSdocs.glitchstudios.dev
Browse docs

Commands#

Command Who What
/chopadmin status group.admin Lists every yard: free, or the owner and seconds left.
/chopadmin end <yard> group.admin Closes the bay and crushes the car. Logged.
/chopadmin cooldown <playerId> group.admin Clears the player's drop-off cooldown. Logged.

The command is registered through ox_lib with restricted = 'group.admin'. From the server console it prints the reply instead of sending a notification.

Server exports#

Export signature Implementation in your package
GetTabletPlaces() server/tablet_places.lua

GetTabletPlaces() returns one entry per yard: { id, label, kind = 'yard', coords, radius = 35.0 }. glitch-criminaltablet reads it as a places provider for its map.

Client exports#

The resource registers no client exports.

Client events for rc-interactions#

The yard boss flow's EVENT nodes fire these local client events. Each one runs the same server-checked action as the matching target option.

Event Action
glitch-chopshop:rc:dropoff Drop off a car
glitch-chopshop:rc:handin Hand over the part
glitch-chopshop:rc:finish Finish up (already confirmed in the dialogue)
glitch-chopshop:rc:sell Open the sell menu
glitch-chopshop:rc:clear Clear the bay

The flow branches on these variables:

Variable Values
chop_state carrying, mine (your car is in the bay), busy or free
chop_sell boss or fence
chop_met 0 the first time a player talks to a yard boss, then 1
chop_cooldown Minutes until this player may drop off another car

State other resources can read#

Key Where Contents
chop:<yardId> GlobalState { owner, expires, netId } while a car is in that bay, nil otherwise. expires is a Unix time.
chop:sellMode GlobalState 'boss' or 'fence'
chop:rcProject GlobalState UUID of the yard boss flow, or nil
glitch_chop Entity state bag on the car { yard, owner, removed, locked, handed }. removed and locked are keyed by part id; handed is the number of parts handed in.

Events this resource sends#

Event Side When
glitch_criminaltablet:reportJobComplete Server, local A car is finished with at least minParts parts handed in and glitch-criminaltablet is running. Sent with jobId, participants, coords, evidenceClean and skipPayout = true.
glitch-pauseMenu:legend:name Client, local Yard blip names for glitch-pauseMenu, when blips and Config.PauseMenuLegend are on.

Callbacks#

Every action goes through ox_lib callbacks that the server checks: glitch-chopshop:dropOff, beginPart, finishPart, handIn, finish, clearBay, sellList, sell and talkState. They check the routing bucket, the distance to the boss or the car, the bay owner and the timing. They belong to the resource's own flow and are not meant to be called by other resources. To react to chopping from your own scripts, read the state above.