Script 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.luaTarget:
modules/target/client.luaNotify, progressbar, skillbar, and other helper functions:
modules/utils/client.luaServer-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)
endTarget 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:
Vehicle Key Integration
File: modules/utils/client.lua
Spawned scenario vehicles can give or remove keys through these helper functions:
Utils.giveVehicleKey(plate, entity)Utils.removeVehicleKey(plate)
Purpose of this integration:
Give the player keys for heist-related vehicles when the script spawns or assigns one
Remove keys again if your flow requires cleanup
Adapt the key logic if your server does not use
qb-vehiclekeys
Default script behavior:
If you use 0r-vehiclekeys, you can adapt it like this:
If your key script uses exports instead of events, replace these lines with your own export calls. Keep the same function names so the rest of the heist flow continues to work without other changes.
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:
Read the existing function and keep the same input/output behavior.
Replace only the integration-specific lines with your own export or event.
Do not change return types unless you know the script expects it.
Test one scenario at a time in game.
If your server already uses ox_lib and the same common target and inventory systems as the resource expects, you may only need small changes or no changes at all.
Last updated