Client

This section covers the client-side functions located in integration/client/. These functions unify interactions with third-party resources like Target systems, Inventory (client actions), Fuel, Keys, and UI elements.

Target System

The bridge standardizes all target interactions using the qb-target data structure. If ox_target is used, the bridge automatically converts the syntax (mapping action to onSelect, job to groups, etc.).

Bridge.AddBoxZone

Creates a box zone for targeting.

--- @param name string Unique name for the zone
--- @param center vector3 Central coordinates
--- @param length number Length of the box
--- @param width number Width of the box
--- @param options table Zone options (minZ, maxZ, debugPoly, heading, useZ)
--- @param targetoptions table List of options using qb-target structure
Bridge.AddBoxZone("my_zone", vector3(100.0, 200.0, 30.0), 2.0, 2.0, {
    minZ = 29.0,
    maxZ = 31.0,
    debugPoly = false,
    heading = 90.0
}, {
    options = {
        {
            type = "client", -- or "server", "command"
            event = "myscript:client:action",
            icon = "fas fa-user",
            label = "Interact",
            job = "police", -- qb-target standard
            gang = "ballas", -- qb-target standard
            item = "handcuffs", -- qb-target standard
            action = function() -- Optional function support if not using event
                print("Clicked")
            end
        }
    },
    distance = 2.5
})

Bridge.AddPolyZone

Creates a complex polygon zone.

Bridge.AddCircleZone

Creates a spherical/circular zone.

Bridge.AddTargetEntity

Adds target options to specific entities (NetID or Local).

Bridge.AddTargetModel

Adds target options to specific models.

Bridge.RemoveZone

Removes a registered zone by name.


UI & Progress

The bridge standardizes progress bars using the ox_lib data structure.

Bridge.ShowProgress

Displays a progress bar (Circle in Ox, standard bar in QB/ESX).

Bridge.Notify

Sends a notification to the player.

Lua


Inventory (Client)

Bridge.OpenStash

Opens a stash inventory for the player.

Bridge.OpenSearchInventory

Opens another player's inventory (e.g., searching/robbing).

Bridge.CloseInventory

Forces the inventory to close.

Bridge.SetInventoryBusy

Sets the player's inventory state to busy (prevents opening).


Vehicles & Keys

Bridge.GiveVehicleKey

Gives keys for a specific vehicle to the player.

Bridge.RemoveVehicleKey

Removes keys from the player.

Bridge.SetVehicleFuel

Sets the fuel level of a vehicle.

Bridge.StoreVehicleHousing

Stores a vehicle in a housing garage (Supporting CD, OkOk, JG, Loaf, Ak47).

Bridge.OpenGarageHousing

Opens the garage menu for a specific housing property.


Status

Bridge.IsDead

Checks if a player (or self) is dead. Supports Metadata checks and Animation checks.

Bridge.IsLastStand

Checks if a player is in the "last stand" / downed state.

Bridge.IsIncapacitated

Checks if the player is either dead OR in last stand.

Last updated