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, andmodules/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_targetqb-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.showTextUIandlib.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:
Utils.progressBar(data)
Utils.skillCheck(difficulty, inputs)
If you use your own scripts, replace those functions only and keep the same return behavior.
Example:
function Utils.progressBar(data)
return exports["my_progressbar"]:Progress(data)
end
Framework Integration#
Files:
modules/bridge/init.luamodules/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:
- Keep function names and returned values the same.
- Replace only the export or event lines.
- Test all 3 default scenarios after editing integrations.