puzzle-pieceScript Integrations

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

If you want to use your own server scripts, the important integration points are the same ones referenced by the original documentation:

  • Inventory: modules/inventory/server.lua

  • Target: modules/target/client.lua

  • Notify, progressbar, skillbar, and other helper functions: modules/utils/client.lua

  • Server-side helper functions: modules/utils/server.lua

Inventory Integration

File: modules/inventory/server.lua

Use this file if your server does not match the default inventory logic. The core things you usually need are:

  • Give item

  • Remove item

  • Check item

  • Count item

If you use a custom inventory, replace the inventory calls in this module with your own exports or events.

Basic example:

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

Target Integration

File: modules/target/client.lua

If you do not use the target system expected by the script, adapt the target zone and entity interaction calls here.

This usually includes:

  • Adding zones

  • Removing zones

  • Adding entity interactions

  • Removing entity interactions

Notify, Progressbar, Skillbar, Dispatch

File: modules/utils/client.lua

Most servers customize this file when they want to connect their own UI systems.

Common changes:

  • Replace notify logic

  • Replace progressbar logic

  • Replace skillcheck logic

  • Replace police dispatch alerts

  • Replace other helper functions used during heist steps

Notify example:

Progressbar example:

Dispatch example:

Server-Side Helpers

File: modules/utils/server.lua

This is the place to adapt server-side helper behavior if your framework or utility layer is custom.

Common examples:

  • Police count checks

  • Server-side notifications

  • Vehicle or entity spawning helpers

Safest Way To Integrate

Use this order:

  1. Read the existing function and keep the same input/output behavior.

  2. Replace only the integration-specific lines with your own export or event.

  3. Do not change return types unless you know the script expects it.

  4. Test one scenario at a time in game.

circle-check

Last updated