Skip to content

Client Overrides ​

These are the client-side manual compatibility overrides from the current Bridge build.

Use this page when you need client-side compatibility for an unsupported or custom setup.

Paste these overrides into fs_bridge/unlocked/client.lua.

Each item below is its own expandable section. Open one to see description, arguments, return value, and example code.

Ambulance ​

IsPlayerDowned

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
sourcenumberNoOptional player source if your ambulance system supports it

Returns:

  • boolean

Override code:

lua
function Override.IsPlayerDowned(source)
    if source then
        return exports['your_ambulance']:isPlayerDowned(source)
    else
        return exports['your_ambulance']:isPlayerDowned()
    end
end

Notes:

  • this override is client-side
  • Bridge resolves this through the ambulance compatibility layer
IsPlayerDead

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
sourcenumberNoOptional player server ID / ped if checking another player, or nil for local player

Returns:

  • boolean

Override code:

lua
function Override.IsPlayerDead(source)
    if source then
        return exports['your_ambulance']:isPlayerDead(source)
    else
        return exports['your_ambulance']:isPlayerDead()
    end
end

Notes:

  • this override is client-side
  • Bridge resolves this through the ambulance compatibility layer
GetAmbulanceResourceName

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • string resource name
  • nil if you do not want to report one

Override code:

lua
function Override.GetAmbulanceResourceName()
    return 'your_ambulance'
end

Notes:

  • this override is client-side
  • return the exact started resource folder name

Banking ​

OpenBossMenu

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
jobstringYesJob name for the boss menu

Returns:

  • optional result from your banking resource

Override code:

lua
function Override.OpenBossMenu(job)
    return exports['your_banking']:openBossMenu(job)
end

Notes:

  • use the exact export or event name from your banking resource
  • this override is client-side
GetBankResourceName (Client)

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • string resource name
  • nil if you do not want to report one

Override code:

lua
function Override.GetBankResourceName()
    return 'your_banking'
end

Notes:

  • return the exact started resource folder name
  • if you also need this on the server side, define the same function in fs_bridge/unlocked/server.lua

Clothing ​

ResetPedCurrentScriptSkin

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • optional result from your clothing resource

Override code:

lua
function Override.ResetPedCurrentScriptSkin()
    TriggerEvent('your_clothing:resetSkin')
end

Notes:

  • this override is client-side
  • replace the example event with your real clothing reset event or export
SavePedCurrentScriptSkin

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • optional result from your clothing resource

Override code:

lua
function Override.SavePedCurrentScriptSkin()
    TriggerServerEvent('your_clothing:saveSkin')
end

Notes:

  • this override is client-side
  • replace the example event with your real clothing save flow
GetClothingResourceName

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • string resource name
  • nil if you do not want to report one

Override code:

lua
function Override.GetClothingResourceName()
    return 'your_clothing'
end

Notes:

  • return the exact started resource folder name
  • this override is client-side

Dispatch ​

AddCustomDispatch

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
argument.JobtableYesTarget jobs
argument.Locationvector3YesDispatch location
argument.CallCode.CodestringNoDispatch call code
argument.CallCode.TitlestringNoDispatch title
argument.MessagestringYesMain dispatch message
argument.FlashesbooleanNoFlash state
argument.ImagestringNoOptional image URL
argument.iconstringNoDispatch icon
argument.BliptableNoBlip settings

Returns:

  • optional result from your dispatch resource

Override code:

lua
function Override.AddCustomDispatch(argument)
    return exports['your_dispatch']:sendAlert(argument)
end

Notes:

  • this override is client-side
  • Bridge also supports a server-side dispatch override on the server page
GetDispatchResourceName (Client)

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • string resource name
  • nil if you do not want to report one

Override code:

lua
function Override.GetDispatchResourceName()
    return 'your_dispatch'
end

Notes:

  • this override is client-side
  • return the exact started resource folder name

Interface ​

Notification

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
argument.descriptionstringYesMain notification text
argument.titlestringNoNotification title
argument.typestringNoExample: inform, success, warning, error
argument.positionstringNoBridge defaults this to top
argument.durationnumberNoBridge defaults this to 5000

Returns:

  • optional result from your notification resource

Override code:

lua
function Override.Notification(argument)
    return exports['your_notify']:notify({
        title = argument.title,
        description = argument.description,
        type = argument.type,
        position = argument.position,
        duration = argument.duration,
    })
end

Notes:

  • this override is client-side
  • Bridge already normalizes string notifications into a table before calling this override
TextUi

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
textstringNoText to show; may be nil when hiding
options.typestringNoExample: inform, success, warning, error
options.iconstringNoFont Awesome icon
options.iconColorstringNoHex color
options.positionstringNoExample: right-center, left-center, top-center, bottom-center
options.iconAnimationstringNoExample: spin, pulse, bounce, shake

Returns:

  • optional result from your text UI resource

Override code:

lua
function Override.TextUi(text, options)
    if not text then
        return exports['your_textui']:hideTextUi()
    end

    return exports['your_textui']:showTextUi(text, options or {})
end

Notes:

  • this override is client-side
  • use one function for both show and hide behavior
SetClipBoard

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
stringstringYesText to copy

Returns:

  • optional result from your clipboard resource

Override code:

lua
function Override.SetClipBoard(string)
    return exports['your_clipboard']:setClipboard(string)
end

Notes:

  • this override is client-side
  • Bridge only calls this when a string is provided

Inventory ​

OpenStash

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
argument.namestringYesUnique stash name
argument.labelstringYesStash label shown in UI
argument.slotsnumberYesSlot count
argument.weightnumberYesMax weight
argument.coordsvector3NoStash location
argument.jobstableNoJob access rules
argument.identifierstringNoOwner-linked identifier

Returns:

  • optional result from your inventory resource

Override code:

lua
function Override.OpenStash(argument)
    return exports['your_inventory']:openStash({
        name = argument.name,
        label = argument.label,
        slots = argument.slots,
        weight = argument.weight,
        coords = argument.coords,
        jobs = argument.jobs,
        identifier = argument.identifier,
    })
end

Notes:

  • this override is client-side
  • keep your security checks around coords, jobs, or identifier
OpenShop

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
argument.namestringYesUnique shop name
argument.labelstringYesShop label shown in UI
argument.itemstableYesShop item list

Returns:

  • optional result from your inventory resource

Override code:

lua
function Override.OpenShop(argument)
    return exports['your_inventory']:openShop({
        name = argument.name,
        label = argument.label,
        items = argument.items,
    })
end

Notes:

  • this override is client-side
  • the current Bridge source marks this path as one you should test carefully with your inventory

Phone ​

GetPhoneResourceName (Client)

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • string resource name
  • nil if you do not want to report one

Override code:

lua
function Override.GetPhoneResourceName()
    return 'your_phone'
end

Notes:

  • return the exact started resource folder name
  • if you also need this on the server side, define the same function in fs_bridge/unlocked/server.lua

Player Status ​

Hunger

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
valuenumberYes1-100 percentage-style value to add or remove from the current hunger status

Returns:

  • optional result from your status resource

Override code:

lua
function Override.AddHunger(value)
    return exports['your_status']:addHunger(value)
end

function Override.RemoveHunger(value)
    return exports['your_status']:removeHunger(value)
end

Notes:

  • Bridge expects value to be a numeric 1-100 percentage-style change on the current hunger status
  • this override is client-side
Thirst

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
valuenumberYes1-100 percentage-style value to add or remove from the current thirst status

Returns:

  • optional result from your status resource

Override code:

lua
function Override.AddThirst(value)
    return exports['your_status']:addThirst(value)
end

function Override.RemoveThirst(value)
    return exports['your_status']:removeThirst(value)
end

Notes:

  • Bridge expects value to be a numeric 1-100 percentage-style change on the current thirst status
  • this override is client-side
Stress

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
valuenumberYes1-100 percentage-style value to add or remove from the current stress status

Returns:

  • optional result from your stress resource

Override code:

lua
function Override.AddStress(value)
    return exports['your_status']:addStress(value)
end

function Override.RemoveStress(value)
    return exports['your_status']:removeStress(value)
end

Notes:

  • Bridge expects value to be a numeric 1-100 percentage-style change on the current stress status
  • this override is client-side
Health

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
valuenumberYesAmount to add or remove

Returns:

  • optional result from your health logic

Override code:

lua
function Override.AddHealth(value)
    local ped = PlayerPedId()
    SetEntityHealth(ped, GetEntityHealth(ped) + value)
end

function Override.RemoveHealth(value)
    local ped = PlayerPedId()
    SetEntityHealth(ped, GetEntityHealth(ped) - value)
end

Notes:

  • this override is client-side
  • clamp values if your server needs stricter health limits
Armour

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
valuenumberYes1-100 percentage-style value to add or remove from the current armour

Returns:

  • optional result from your armour logic

Override code:

lua
function Override.AddArmour(value)
    local ped = PlayerPedId()
    SetPedArmour(ped, math.min(100, GetPedArmour(ped) + value))
end

function Override.RemoveArmour(value)
    local ped = PlayerPedId()
    SetPedArmour(ped, math.max(0, GetPedArmour(ped) - value))
end

Notes:

  • Bridge expects value to be a numeric 1-100 percentage-style change on the current armour
  • this override is client-side
  • this example clamps armour between 0 and 100

Vehicle Fuel ​

SetFuel

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
vehiclenumberYesVehicle entity handle
valuenumberNoFuel amount; Bridge defaults to 100.0 when not provided

Returns:

  • optional result from your fuel resource

Override code:

lua
function Override.SetFuel(vehicle, value)
    return exports['your_fuel']:setFuel(vehicle, value)
end

Notes:

  • this override is client-side
  • match the fuel scale used by your fuel resource
GetFuel

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
vehiclenumberYesVehicle entity handle

Returns:

  • number fuel amount

Override code:

lua
function Override.GetFuel(vehicle)
    return exports['your_fuel']:getFuel(vehicle)
end

Notes:

  • this override is client-side
  • Bridge falls back to 0.0 if nothing is returned
GetFuelResourceName

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • string resource name
  • nil if you do not want to report one

Override code:

lua
function Override.GetFuelResourceName()
    return 'your_fuel'
end

Notes:

  • this override is client-side
  • return the exact started resource folder name

Vehicle Keys ​

GiveCarKeyPlayer (Client)

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
vehiclenumberYesVehicle entity handle

Returns:

  • optional result from your vehicle-keys resource

Override code:

lua
function Override.GiveCarKeyPlayer(vehicle)
    return exports['your_keys']:giveKeys(vehicle)
end

Notes:

  • this override is client-side
  • use the client-facing give-keys function from your keys resource
RemoveCarKeyPlayer (Client)

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

NameTypeRequiredNotes
vehiclenumberYesVehicle entity handle

Returns:

  • optional result from your vehicle-keys resource

Override code:

lua
function Override.RemoveCarKeyPlayer(vehicle)
    return exports['your_keys']:removeKeys(vehicle)
end

Notes:

  • this override is client-side
  • use the client-facing remove-keys function from your keys resource
GetVehicleKeysResourceName (Client)

Description:

Copy this code into fs_bridge/unlocked/client.lua.

Arguments:

  • none

Returns:

  • string resource name
  • nil if you do not want to report one

Override code:

lua
function Override.GetVehicleKeysResourceName()
    return 'your_keys'
end

Notes:

  • this override is client-side
  • return the exact started resource folder name

FWB Studio documentation.