Skip to content

Brownies — Editable Files (Client) ​

FileWhat it is for
fwb_brownies/bridge/tv_sound/client.luaWhere the TV sound comes from
fwb_brownies/bridge/business_setup/mlo_models.luaYour MLO's own props, found first by the setup tool
fwb_brownies/bridge/zone_engine/<ox_lib, polyzone>/client.luaThe zone engine that knows when a player is inside
bridge/progressbar/<builtin, ox_lib>/client.luaProgress bars (both resources)
bridge/notify/<name>/client.luaNotifications (both resources)
bridge/inventory/<name>/client.luaInventory, client side (both resources)
bridge/frameworks/<esx, qbcore, qbox>/client.luaThe framework code (both resources)

Restart the resource after you edit a file.


TV sound bridge — bridge/tv_sound/client.lua ​

By default the TVs need nothing else: the TV's own hidden browser plays the picture and the sound, and the volume fades with the distance (builtin).

To send the sound through a 3D sound resource you already run, switch the MODE line at the top:

lua
-- local MODE = 'builtin'
local MODE = 'xsound'
ModeResource
builtinNone (default)
xsoundxSound (free)
mx-surroundSurround by MOXHA (paid)
high_3dsounds3D Sounds by High (paid)
qs-3dsound3D Sound by Quasar (paid)
sounitySounity (free)
  • The picture still comes from the built-in browser (muted then).
  • If the chosen resource is not started, or it can't play a link (for example a YouTube link), the built-in sound plays instead.

Add another sound resource: copy an adapter (adapters['xsound'] is the simplest), set resource to its folder name, and fill in its three functions with that resource's exports:

FunctionWhen
Play(id, url, coords, elapsedSeconds, volume, range)Start the sound. Return true when it plays, false to use the built-in sound. volume is 0–100.
Volume(id, volume)The volume slider on the TV moved
Stop(id)The TV stopped, another link started, or the player left

Then set local MODE = 'my_sound'. Every call is wrapped in pcall: a wrong export name only falls back to the built-in sound and prints one warning in F8.


Your MLO's props — bridge/business_setup/mlo_models.lua ​

When a spot is added by picking a prop that is already in the map, the setup tool picks the models listed here first. It finds your MLO's own pole, TV, table or plant even when the aim is a little off.

  1. Find the prop's model name (CodeWalker, or the MLO's .ytyp / stream files).
  2. Add it to the list of that spot type:
lua
FSBrowniesMloModels = {
    entertainment = { 'my_mlo_pole' },                          -- dance poles
    tvs = { { model = 'my_mlo_tv', target = 'tvscreen' } },     -- TVs need their screen name
    plants = {}, hookahTables = {}, labCrafting = {},
    shop = {}, register = {}, duty = {}, boss = {}, staff = {},
    stash = {}, supplies = {},
}
  1. Restart the resource.

TVs need the name of their screen (render target) too. Most TVs use tvscreen; ask the MLO maker if yours is different. A TV model without a known screen can't show video.


Zone engine — bridge/zone_engine/ ​

The business zone needs ox_lib or PolyZone. Auto picks ox_lib first, then PolyZone. Pick one on the Bridges page (restart needed).


Progress bar — bridge/progressbar/ ​

The built-in progress bar is the default. ox_lib can be picked on the Bridges page / Bridge tab; ox_lib only has to run when you pick it.

Add another: copy the builtin folder, rename it, change FSBridge.Progressbars.<name> (label, resource, detect()) and write its start(opts). The manifest loads every folder by itself.

FWB Studio documentation.