🔌Exports & Events
BurgerShot doesn't define classic exports(...) functions of its own — its cross-resource surface is a set of ox_lib callbacks and events, namespaced with the resource name (pl_burgershot:...). This page documents every one that's actually meant to be called from outside the script, with real payload shapes taken straight from the source.
Kiosk integration contract
This is the contract the companion pl_restaurantapp (delivery/ordering app for lb-phone and gksphone — documentation forthcoming) uses to sell BurgerShot food through its "kiosk" adapter. Any resource can use the same 3 calls to integrate.
pl_burgershot:getKioskData — callback
No arguments. Returns the categorized menu, or nil if the shop is closed.
local menu = lib.callback.await('pl_burgershot:getKioskData', false)
-- menu = {
-- Burgers = { label = "Burgers", items = {
-- { item_name = "bs_classic_burger", name = "Classic Burger", price = 40, stock = 12, image = "nui://pl_burgershot/web/assets/items/bs_classic_burger.png" },
-- ...
-- }},
-- Fries = { ... }, Drinks = { ... },
-- }
-- returns nil if the shop is currently closedpl_burgershot:placeKioskOrder — callback
Args: items (array of { item, name?, quantity }), paymentMethod ('bank' or 'counter'). Returns: orderId (string) on success, or nil, err on failure.
'bank' charges the caller's bank account immediately and puts the order straight into the Pending queue for staff to approve. 'counter' places it unpaid — staff must send a bill afterwards (see Custom Billing).
pl_burgershot:client:notify — event (server → specific client)
Fired to the customer at various points in the order lifecycle (order ready, order rejected/refunded, tip received, etc). Payload: (message: string, ntype: 'success'|'error'|'inform').
Other server callbacks
These aren't part of the kiosk contract but are still registered with lib.callback.register and safe to call from another server-side resource in the same process (they all check the caller's job/grade internally):
pl_burgershot:getOrders
—
pending, cooking, ready order-queue tables (staff only)
pl_burgershot:getSocietyBalance
—
business bank balance (boss only)
pl_burgershot:getOrderHistory
—
last 500 completed orders (boss only)
pl_burgershot:duty:getStatus
—
true/false, whether the caller is currently clocked in
pl_burgershot:duty:getShiftHistory
—
last 500 shift records (boss only)
pl_burgershot:getPendingOrders
—
ingredient restock orders still in transit (staff only)
pl_burgershot:grill:getState / fryer:getState / assembly:getState
—
live station state + server game timer
Script-scope helper functions (not cross-resource exports)
server/modules/duty.lua defines two global Lua functions, not exports, so other modules inside pl_burgershot can read/update duty status directly:
These are not callable via exports['pl_burgershot']:... from another resource — they only exist in this script's own Lua environment. If you need duty status from another resource, use the duty:getStatus callback above instead.
What BurgerShot calls on other resources
For completeness — these are the external calls BurgerShot itself makes, in case you're building a compatible replacement for one of them:
exports['pl_lib']:... (many)
pl_lib
Framework, target, notify, textUI, clothing, society/banking, logging
exports['pl_restaurant_tools']:hasBuilderAccess(source)
pl_restaurant_tools (optional)
Gates in-world builder/editing tools
exports['rpemotes']:EmoteCancel/EmoteCommandStart
rpemotes (optional carry style)
Carry emotes configured via Config.Carry[item].Emote
exports['qb-inventory']:OpenInventory(...)
qb-inventory (if detected)
Opens the stash/fridge as a linked inventory
Last updated