Skip to Content
TabletConfiguration

Configuration

LB Tablet is highly configurable and automatically detects your framework by default.

If you want to customize the tablet further, you can do so in the config folder.

MDT

MDTs are configured in lb-tablet/config/mdts.json. See MDT for adding MDTs, copying existing MDTs, sharing report tabs between MDTs and more.

Custom framework and inventory

If your framework is not supported, use the files in client/custom/frameworks/standalone/ and server/custom/frameworks/standalone/ as a starting point.

Required inventory functions

Implement the client-side item check in client/custom/frameworks/standalone/items.lua:

---@return boolean function HasItem() -- Return whether the local player has Config.Item.Name end

Call ItemCountChanged() whenever the tablet item count changes. It refreshes the local tablet state and notifies the server when the result changes.

Implement the server-side item functions in server/custom/frameworks/standalone/items.lua:

---@param source number ---@param itemName string ---@return boolean function HasItem(source, itemName) -- Return whether the player has the item end ---@param item string ---@param cb fun(source: number) function CreateUsableItem(item, cb) -- Register the item and call cb when a player uses it end

If you use a custom inventory and allow MDT reports to be exported as items, implement GiveItemWithMetadata in server/custom/functions/items.lua:

---@param source number ---@param item string ---@param metadata { [string]: any } ---@return boolean success function GiveItemWithMetadata(source, item, metadata) -- Give one item with the supplied metadata end

Inventory events

When an item with metadata is used, custom inventory integrations should trigger lb-tablet:usedItem on the server. This is required for exported MDT report items to open correctly.

---@param source number ---@param item string ---@param metadata { [string]: any } TriggerEvent("lb-tablet:usedItem", source, item, metadata)

QBCore & QBox

Licenses

By default, only the driver and weapon licenses are enabled. You can enable more licenses by adding them to the local licenses table in lb-tablet/server/custom/frameworks/qb.lua/lb-tablet/server/custom/frameworks/qbx.lua.

local licenses = { { label = "Driver's License", type = "driver" }, { label = "Weapon License", type = "weapon" } }