Functions

Information regarding boii_base server inventory functions

Locals

Local functions are assigned to the boii object you can access this object by adding the export below into your server side files.

local boii = exports['boii_base']:get_object()
boii.add_drop_inventory = add_drop_inventory
boii.remove_drop_inventory = remove_drop_inventory
boii.get_drop_inventories = get_drop_inventories
boii.get_drop_inventory = get_drop_inventory

add_drop_inventory(drop_inventory_data)

Function to add a new drop inventory entry to all clients

local function add_drop_inventory(drop_inventory_data)
    drop_inventories[#drop_inventories + 1] = drop_inventory_data
    TriggerClientEvent('update_drop_inventories', -1, drop_inventories) -- Send updated drop inventories to all clients
end

remove_drop_entry(drop_id)

Function to remove a drop inventory entry from all clients

local function remove_drop_inventory(drop_id)
    table.remove(drop_inventories, drop_id)
    TriggerClientEvent('update_drop_inventories', -1, drop_inventories) -- Send updated drop inventories to all clients
end

get_drop_inventories()

Function to return drop inventories table

local function get_drop_inventories()
    return drop_inventories
end

get_drop_inventory(drop_id)

Function to get a specific drop inventory by ID

local function get_drop_inventory(drop_id)
    return drop_inventories[drop_id]
end

Last updated