bs_traders
SCUM-style NPC traders and mission givers.
Generated from the Lua sources in resources/[beyond]/bs_traders/. 45 entries. The description column is the comment above the line in the code, so if it’s empty nobody wrote one yet.
Exports
Section titled “Exports”Call with exports.bs_traders:Name(...) from the same side.
| Name | Side | Where | Description |
|---|---|---|---|
SetTrackerShown | client | client/cl_main.lua:207 | |
TrackerShown | client | client/cl_main.lua:206 | Used by the Settings tab in bs_inventory. |
ClassifyOutfit | server | server/sv_wardrobe.lua:337 | What may be saved as worn. |
Callbacks
Section titled “Callbacks”Server callbacks are called from a client with BSB.Await(name, timeoutMs, ...). Client callbacks are called from the server with BSB.AwaitClient(src, name, timeoutMs, ...).
| Name | Direction | Where | Description |
|---|---|---|---|
traders:buy | client -> server | server/sv_traders.lua:316 | |
traders:debug:duplicateNpc | client -> server | server/sv_traders.lua:665 | |
traders:debug:here | client -> server | server/sv_traders.lua:733 | “Teleport this NPC to me”, offered next to the manual x/y/z form. |
traders:debug:list | client -> server | server/sv_traders.lua:624 | |
traders:debug:mayuse | client -> server | server/sv_traders.lua:18 | |
traders:debug:resetMission | client -> server | server/sv_traders.lua:725 | |
traders:debug:resetNpc | client -> server | server/sv_traders.lua:706 | |
traders:debug:saveMission | client -> server | server/sv_traders.lua:715 | |
traders:debug:saveNpc | client -> server | server/sv_traders.lua:638 | patch may set: label, role, model, scenario, heading, x, y, z, buys, sells, missions (array of mission ids), clothing, disabled. |
traders:debug:teleport | client -> server | server/sv_traders.lua:745 | Reverse of npcs:debug:here: take the caller to this NPC. |
traders:list | client -> server | server/sv_traders.lua:174 | Only enabled NPCs and only the fields a client needs to spawn one; prices and stock stay server-side. |
traders:missionAbandon | client -> server | server/sv_traders.lua:506 | |
traders:missionAccept | client -> server | server/sv_traders.lua:457 | One reason string per failed condition instead of a generic “unavailable”; app.js flash() shows it. |
traders:missionTurnIn | client -> server | server/sv_traders.lua:524 | |
traders:open | client -> server | server/sv_traders.lua:194 | Debug: reports which of the three checks rejected (no npc, disabled, too far) instead of one silent { ok = false }. |
traders:sell | client -> server | server/sv_traders.lua:369 | |
wardrobe:buy | client -> server | server/sv_wardrobe.lua:179 | Confirm a whole fitting at once. |
wardrobe:open | client -> server | server/sv_wardrobe.lua:147 | What the panel needs that the client cannot work out. |
wardrobe:outfitDelete | client -> server | server/sv_wardrobe.lua:323 | |
wardrobe:outfitSave | client -> server | server/sv_wardrobe.lua:262 | Save what is on the ped, by name. |
Events
Section titled “Events”“net” means the handler is registered with RegisterNetEvent, so the other side can trigger it. “local” is AddEventHandler only (same side, or game events).
| Name | Side | Type | Where | Description |
|---|---|---|---|---|
bs:factionBases:changed | server | local | server/sv_flagnpcs.lua:52 | |
bs:hook:player:action | server | local | server/sv_traders.lua:593 | Fed by bs_core’s reward pipeline (sv_rewards.lua), which fires this per zombie kill with the actionId a mission’s filter lists. |
bs:hook:player:loaded | server | local | server/sv_traders.lua:757 | |
bs:hook:player:unloaded | client | local | client/cl_debug.lua:218 | |
bs:hook:player:unloaded | server | local | server/sv_traders.lua:797 | |
bs:inventory:state | client | net | client/cl_main.lua:161 | bs_inventory fires this on its own client whenever the bag changes. |
bs:player:money | client | net | client/cl_wardrobe.lua:533 | Cash is read once in wardrobe:open, so a balance change while in the shop left Confirm disabled on a stale value. |
bs:traders:progress | client | net | client/cl_main.lua:114 | |
bs:traders:reload | client | net | client/cl_peds.lua:266 | Broadcast by the debug menu after save/reset/create/delete so live edits show up for nearby players without a restart. |
bs:traders:talk | client | net | client/cl_peds.lua:275 | bs_interactions wraps every triggered option in one payload table rather than passing args on its own - see Target.Run in cl_target.lua - so the npcId set as args above… |
bs:traders:tracker | client | net | client/cl_main.lua:153 | |
bs:traders:wardrobe | client | net | client/cl_wardrobe.lua:540 | Raised by the dot option cl_peds registers on clothing peds. |
bs:ui:opened | client | local | client/cl_debug.lua:213 | The shop menu closes itself when anything else opens (cl_main.lua); this does the same back, so the two never fight for NUI focus. |
bs:ui:panic | client | local | client/cl_debug.lua:217 | |
onClientResourceStart | client | local | client/cl_peds.lua:285 | bs_interactions restart: its Registry.entities table is rebuilt empty, leaving trader peds with no ALT prompt. |
onResourceStart | server | local | server/sv_traders.lua:769 | Rehydrate everyone already in the world. |
onResourceStop | client | local | client/cl_debug.lua:220 | |
playerDropped | server | local | server/sv_traders.lua:804 |
Commands
Section titled “Commands”| Command | Side | Where | Description |
|---|---|---|---|
/missions | client | client/cl_main.lua:198 | |
/traderdebug | client | client/cl_debug.lua:117 | |
/unstick | client | client/cl_wardrobe.lua:573 | Escape hatch that does not depend on the UI: a plain chat command that restores the player from any state this resource can leave them in (no NUI, focus or page needed). |
/wardrobetest | client | client/cl_wardrobe.lua:593 | Panel-only test: opens the wardrobe UI with a small fake payload and no server calls (no npc, nothing can be bought or saved). |
bs19.org · Privacy · Terms · Cookie settings
Cookies and outside content
The site only needs two essential cookies to keep you logged in and protect forms. Videos and streams from YouTube and Twitch load from their servers, which can set their own cookies, so they stay off until you say yes. Nothing is pre-ticked and you can change your mind any time with "Cookie settings" at the bottom of every page. Details.
Questions about the server, the framework or the site? A real person reads this, usually within a day.