If you want to use your own scripts, the important files are easy to find:
- Inventory:
modules/inventory/server.lua - Target:
modules/target/client.lua - Notify, progressbar, skillbar, HUD, dispatch, fuel, and vehicle keys:
modules/utils/client.lua - Server-side helper functions:
modules/utils/server.lua - Job start/stop hooks:
modules/exports/client.luaandmodules/exports/server.lua
Inventory Integration#
File: modules/inventory/server.lua
This file contains 4 main functions:
giveItemremoveItemhasItemgetItemCountByName
If you use a custom inventory, replace the logic inside these functions with your own export or event calls.
Basic example:
function Inventory.giveItem(source, itemName, count)
return exports['my_inventory']:AddItem(source, itemName, count)
end
Target Integration#
File: modules/target/client.lua
The script already includes support for ox_target and qb-target. If you use another target system, replace the fallback else sections with your own target exports.
Main functions:
addBoxZoneremoveZoneaddLocalEntityremoveLocalEntityaddBoneremoveBone
Notify, Progressbar, Skillbar, HUD, Dispatch, Keys, Fuel#
File: modules/utils/client.lua
This is the main file for custom client-side integrations. The functions most servers edit are:
Utils.notifyUtils.toggleHudUtils.triggerPoliceAlertUtils.giveVehicleKeyUtils.setFuelUtils.progressBarUtils.skillCheck
Notify example:
function Utils.notify(title, type, duration, description)
exports['my_notify']:Send({
title = title,
description = description,
type = type,
duration = duration
})
end
Progressbar example:
function Utils.progressBar(data)
return exports['my_progressbar']:Progress(data)
end
Dispatch example:
function Utils.triggerPoliceAlert(alertType)
exports['my_dispatch']:SendAlert({
code = alertType,
coords = GetEntityCoords(cache.ped)
})
end
Server-Side Helper Functions#
File: modules/utils/server.lua
Important functions in this file:
Utils.getPoliceCountUtils.server_notifyUtils.spawnVehicle
If your server handles police checks or notifications differently, this is where you should adapt the logic.
Job Hooks and Custom Logic#
Files:
modules/exports/client.luamodules/exports/server.lua
These hooks let you add extra logic without changing the whole job flow:
beforeJobStartonJobStartedonJobStopped
Common use cases:
- Extra checks before a job starts
- Sending logs to Discord
- Triggering your own dispatch or analytics
- Giving extra rewards after a job ends
Example:
function server.exports.beforeJobStart(lobby, job)
if job.name == 'car_theft' and Utils.getPoliceCount() < 2 then
return false
end
return true
end
Safest Way To Integrate#
Use this order:
- Read the existing function and keep the same input/output logic.
- Replace only the integration part with your own export or event.
- Do not change boolean return values unless you know why.
- Test one job at a time in-game.
If your server already uses ox_target, qb-target, and ox_lib, most of the work is already done. Custom integrations are usually needed for inventory, dispatch, notify, progressbar, keys, fuel, and HUD.