puzzle-pieceScript Integrations

How to connect your own inventory, target, notify, progressbar, skillcheck, fuel, and other scripts

If you want to use your own server scripts, the main integration locations are:

  • Inventory: modules/inventory/server.lua

  • Target: modules/target/client.lua

  • Notify, text UI, clothing, HUD, vehicle keys, fuel, progressbar, and skillcheck: modules/utils/client.lua

  • Framework loader: modules/bridge/init.lua

  • Framework bridge files: modules/bridge/esx, modules/bridge/qb, and modules/bridge/qbx

Inventory Integration

File: modules/inventory/server.lua

This file handles:

  • Give item

  • Remove item

  • Has item

  • Get item count

Example:

function Inventory.giveItem(source, itemName, count)
    return exports["my_inventory"]:AddItem(source, itemName, count)
end

Target Integration

File: modules/target/client.lua

By default the script supports:

  • ox_target

  • qb-target

This version uses:

  • Box zones

  • Local entity interactions

  • Model interactions

  • Global vehicle interactions

If you use another target system, this is the file you replace.

Notify, Text UI, Clothing, HUD, Keys, Fuel

File: modules/utils/client.lua

This is the main custom integration file for V2.

Common changes:

  • Replace lib.notify

  • Replace lib.showTextUI and lib.hideTextUI

  • Replace clothing loader

  • Replace HUD visibility export

  • Replace vehicle key logic

  • Replace fuel setter

Progressbar and Skillcheck

File: modules/utils/client.lua

V2 already wraps these helpers:

If you use your own scripts, replace those functions only and keep the same return behavior.

Example:

Framework Integration

Files:

  • modules/bridge/init.lua

  • modules/bridge/esx/*

  • modules/bridge/qb/*

  • modules/bridge/qbx/*

Use these files if your player loaded events or framework object access differ from the default supported versions.

Safest Way To Integrate

Use this order:

  1. Keep function names and returned values the same.

  2. Replace only the export or event lines.

  3. Test all 3 default scenarios after editing integrations.

Last updated