Server

This section completes the API reference by covering Inventory, Server-Side Vehicle Keys, and Third-Party Banking integrations. These functions are located in integration/server/ and exposed via the main Bridge object.

Inventory

The bridge provides a unified API for managing player inventories.

Bridge.AddItem

Adds an item to the player's inventory. Handles slot and metadata for supported inventories.

--- @param source number Player Server ID
--- @param item string Item name
--- @param amount number Count
--- @param slot number|nil (Optional) Specific slot
--- @param meta table|nil (Optional) Item metadata
--- @return boolean Success
local success = Bridge.AddItem(source, 'water', 5, nil, { quality = 100 })

Bridge.RemoveItem

Removes an item from the player's inventory.

--- @param source number Player Server ID
--- @param item string Item name
--- @param amount number Count
--- @return boolean Success
local success = Bridge.RemoveItem(source, 'water', 1)

Bridge.GetInventoryItem

Gets the count of a specific item in the player's inventory.

Bridge.HasEnoughItem

Checks if the player has at least the specified amount of an item.

Bridge.CanCarryItem

Checks if the player has enough weight/space to carry the item (Crucial for Ox/QB/QS).

Bridge.GetItems

Returns the server's master list of items (definitions).

Bridge.GetItemLabel

Returns the label of a specific item.

Bridge.CreateUseableItem

Registers a usable item callback.


Vehicle Keys (Server)

These functions allow you to give or remove vehicle keys directly from the server side.

Bridge.GiveVehicleKey

Gives keys for a specific vehicle to a player.

Bridge.RemoveVehicleKey

Removes keys for a specific vehicle from a player.


Banking Integration

it is important to note that the Integration layer (integration/server/banking.lua) extends these functions to support third-party banking resources automatically.

Bridge.GetSocietyMoney

Retrieves the current available balance of a specific job or society account.

Bridge.AddSocietyMoney

Deposits funds into a specific job or society account.

Bridge.RemoveSocietyMoney

Withdraws or removes funds from a specific job or society account.

Last updated