Dev Partners
Integrating with Agency scripts
Building your own FiveM script and want it to talk to ours? Every public export and event is listed here, with a copy-and-paste Lua snippet for each one.
Exports let your script call a function inside ours: exports['script-name']:FunctionName(args), on the client and on the server alike. Events go the other way: you fire them with TriggerEvent or TriggerServerEvent and listen with RegisterNetEvent.
01Agency-Phone
Full multi-framework phone with SMS, calls, social feed, mail, camera, wallet and AgencyPay checkout.
Use inside any shop/robbery/job script where you want a clean in-phone payment flow instead of instantly deducting money. Also ideal for in-game notifications with accept/deny flows (e.g. taxi ride requests, dispatch calls).
Client exports
IsPhoneOpen()Returns true if the phone UI is currently open.
Show example
Skips opening a custom menu while the phone UI is already on screen.
RegisterCommand('openmymenu', function()
if exports['agency-phone']:IsPhoneOpen() then
return
end
TriggerEvent('myresource:openMenu')
end)IsPhonePoweredOn()Returns true if the phone is powered on.
Show example
Pauses background sync work while the phone is powered down by the player.
CreateThread(function()
while true do
Wait(2000)
if not exports['agency-phone']:IsPhonePoweredOn() then
print('Phone off, pausing background sync')
end
end
end)GetPhoneData()Returns the raw phone data table.
Show example
Dumps the full client phone data table for debugging.
RegisterCommand('phonedebug', function()
local data = exports['agency-phone']:GetPhoneData()
print(json.encode(data, { indent = true }))
end)GetPhonePropEntity()Returns the entity handle of the held phone prop, or 0 if not visible.
Show example
Hides the phone prop entity briefly without affecting the underlying logic.
CreateThread(function()
Wait(500)
local prop = exports['agency-phone']:GetPhonePropEntity()
if prop ~= 0 and DoesEntityExist(prop) then
SetEntityVisible(prop, false, false)
end
end)IsPhoneExpanded()Returns true if the phone is expanded on screen.
Show example
Legacy alias used to gate a minigame while the phone is open.
AddEventHandler('myresource:beforeMinigame', function()
if exports['agency-phone']:IsPhoneExpanded() then
TriggerEvent('chat:addMessage', { args = { 'Close phone first' } })
return
end
end)HasCarrierContract()Returns true when the player has an active carrier data plan.
Show example
Warns the player when no carrier data plan is currently active.
RegisterCommand('checkdata', function()
if not exports['agency-phone']:HasCarrierContract() then
TriggerEvent('chat:addMessage', { args = { 'No data plan, buy one in the store app' } })
end
end)GetPhoneState()Returns the complete phone state object.
Show example
Caches phone state on the server only when the phone is open, on, and syncing.
AddEventHandler('myresource:saveProfile', function()
local state = exports['agency-phone']:GetPhoneState()
if state.isOpen and state.poweredOn and state.syncEnabled then
TriggerServerEvent('myresource:server:cachePhoneState', state)
end
end)HasPhone()Returns true if the player has a phone item.
Show example
Blocks an emergency-call command unless the player carries the phone item.
RegisterCommand('callemergency', function()
if not exports['agency-phone']:HasPhone() then
TriggerEvent('chat:addMessage', { args = { 'You need a phone first' } })
return
end
TriggerEvent('myresource:client:openEmergency')
end)RegisterAgencyPayPoint(id, data)Registers a recurring AgencyPay merchant terminal.
Show example
Spawns a runtime Agency Pay terminal for a mechanic shop checkout.
CreateThread(function()
exports['agency-phone']:RegisterAgencyPayPoint('mechanic_main', {
coords = vector3(-211.74, -1314.59, 31.29),
label = 'Mechanic Pay Point',
amount = 250,
receiver = 'mechanic'
})
end)RemoveAgencyPayPoint(id)Removes a previously registered AgencyPay terminal.
Show example
Removes the registered pay point when a shop closes for the night.
AddEventHandler('myresource:onShopClosed', function(shopId)
exports['agency-phone']:RemoveAgencyPayPoint('mechanic_main')
print('Removed pay point for shop ' .. shopId)
end)StartAgencyPayCheckout(data)Opens the AgencyPay checkout sheet for secure card payment.
Show example
Opens the phone and starts a small Agency Pay tip checkout.
RegisterCommand('paytip', function()
exports['agency-phone']:StartAgencyPayCheckout({
amount = 25,
receiver = 'staff_tip_jar',
label = 'Staff tip',
memo = 'Thanks for great service'
})
end)StartCall(contactData)Starts a pma-voice call using a contact table.
Show example
Starts an outgoing phone call to a dispatched contact when an event arrives.
RegisterNetEvent('myresource:client:incomingDispatch', function(payload)
exports['agency-phone']:StartCall({
name = payload.callerName or 'Dispatch',
number = payload.callerNumber or '911',
anonymous = false
})
end)PhoneNotification(title, text, icon, color, timeout, acceptIcon, denyIcon)Shows a phone notification with optional accept/deny buttons.
Show example
Shows a blocking accept/deny phone notification for a tow contract.
CreateThread(function()
local accepted = exports['agency-phone']:PhoneNotification(
'Tow request', 'Accept the contract?', 'truck', '#FF8800', 15000, 'check', 'x'
)
if accepted then
TriggerServerEvent('myresource:server:acceptTow')
end
end)Server exports
SendMail(identifier, mailData)Sends mail to a player (online or offline).
Show example
Sends an order receipt mail to a player by their primary identifier.
RegisterNetEvent('myresource:server:sendReceipt', function(targetId)
local identifier = GetPlayerIdentifier(targetId, 0)
exports['agency-phone']:SendMail(identifier, {
sender = '[email protected]',
subject = 'Your receipt',
body = 'Thanks for your purchase!'
})
end)AddChirp(chirpData)Posts a message to the Pulse (chirper) feed.
Show example
Posts a bounty announcement to Chirper from a server-side event.
RegisterNetEvent('myresource:server:postBounty', function(targetName)
local src = source
exports['agency-phone']:AddChirp({
identifier = GetPlayerIdentifier(src, 0),
firstName = 'Bounty',
lastName = 'Office',
message = 'Wanted: ' .. targetName,
postId = ('bounty_%s'):format(GetGameTimer())
})
end)usePhone(event, item, inventory, slot, data)ox_inventory hook registered when ESX+ox_inventory is detected; opens the phone for the inventory holder.
Show example
Hooks ox_inventory's usingItem event to open the phone via the integration helper.
exports.ox_inventory:registerHook('usingItem', function(payload)
if payload.item.name ~= 'phone' then return end
return exports['agency-phone']:usePhone('inventory', payload.item, payload.inventory, payload.slot)
end, { itemFilter = { phone = true } })Events
agency-phone:client:notifyShows a phone notification (title, text, icon, color, timeout, silent).
Show example
Fires a non-blocking phone toast that the player's vehicle is ready.
TriggerEvent('agency-phone:client:notify', 'Heads up', 'Vehicle ready for pickup', 'car', '#22cc88', 5000, false)agency-phone:client:usePhoneItemTriggers the phone open flow when the phone inventory item is used.
Show example
Forwards a custom inventory item-use event to the phone open flow.
AddEventHandler('myresource:client:onItemUsed', function(itemName)
if itemName == 'phone' then
TriggerEvent('agency-phone:client:usePhoneItem')
end
end)agency-phone:client:openAppAsks the phone to navigate to a custom app by id (used by app modules).
Show example
Jumps the phone straight to a custom banking app by app id.
RegisterCommand('openbank', function()
TriggerEvent('agency-phone:client:openApp', 'banking')
end)agency-phone:client:newMailNotifyNotifies the client of a freshly received mail.
Show example
Listens for new mail notifications and logs them for debugging.
AddEventHandler('agency-phone:client:newMailNotify', function(mail)
print(('New mail from %s: %s'):format(mail.sender, mail.subject))
end)agency-phone:server:requestPhoneDataRequests a fresh phone data sync for the calling player.
Show example
Asks the server to push a fresh copy of the phone data sync.
RegisterCommand('refreshphone', function()
TriggerServerEvent('agency-phone:server:requestPhoneData')
end)agency-phone:server:cancelCallCancels or ends an active call.
Show example
Hangs up an active call from a custom keybind or chat command.
RegisterCommand('hangup', function()
TriggerServerEvent('agency-phone:server:cancelCall')
end)agency-phone:server:sendMessageSends an SMS message (newMsg, targetNumber).
Show example
Quickly sends an SMS to a target phone number from chat input.
RegisterCommand('quicksms', function(_, args)
local target, msg = args[1], table.concat(args, ' ', 2)
TriggerServerEvent('agency-phone:server:sendMessage', { message = msg }, target)
end)agency-phone:server:saveSettingPersists a single phone setting key/value for the player.
Show example
Persists a single phone setting whenever the user toggles it client-side.
AddEventHandler('myresource:client:onSettingChanged', function(key, value)
TriggerServerEvent('agency-phone:server:saveSetting', key, value)
end)agency-phone:server:airdropPayPerforms an Agency Airdrop pay-to-nearby-player transfer.
Show example
Triggers an Agency Airdrop pay-to-nearby transfer with the typed amount.
RegisterCommand('airdrop', function(_, args)
local amount = tonumber(args[1]) or 0
TriggerServerEvent('agency-phone:server:airdropPay', amount, 'Tip via airdrop')
end)agency-phone:server:buyDataPlanBuys a carrier data plan for the player (price, planName).
Show example
Buys a chosen carrier data plan after the player picks one in a custom UI.
AddEventHandler('myresource:client:onPlanSelected', function(plan)
TriggerServerEvent('agency-phone:server:buyDataPlan', plan.price, plan.name)
end)agency-phone:dispatch:createCreates a phone dispatch from an emergency call/SMS.
Show example
Generates a phone dispatch entry from an incoming emergency call.
RegisterNetEvent('myresource:server:dispatchFromCall', function(payload)
TriggerEvent('agency-phone:dispatch:create', {
source = source,
coords = payload.coords,
type = 'robbery',
title = '24/7 Robbery'
})
end)02Agency-Pad
AgencyOS tablet with a full app ecosystem. Register your own apps via config.lua.
Perfect for admin dashboards, business management apps, gang territory maps, or any custom UI your players need inside GTA, it lives inside a beautiful tablet shell with no extra work.
Client exports
IsPadOpen()Returns true if the tablet UI is open (check tablet state before showing UIs).
Show example
Avoids re-opening custom tablet UI if the in-game tablet is already up.
RegisterCommand('opentablet', function()
if exports['agency-pad']:IsPadOpen() then
return
end
TriggerEvent('myresource:openTablet')
end)IsPadPoweredOn()Returns true if the tablet is powered on.
Show example
Pauses fleet polling while the tablet is powered off by the player.
CreateThread(function()
while true do
Wait(3000)
if not exports['agency-pad']:IsPadPoweredOn() then
print('Tablet powered down, pausing fleet poll')
end
end
end)GetPadData()Returns the full client-side PadData table.
Show example
Dumps the full client-side tablet data table for inspection.
RegisterCommand('paddebug', function()
local data = exports['agency-pad']:GetPadData()
print(json.encode(data, { indent = true }))
end)GetPadPropEntity()Returns the entity handle of the held tablet prop, or 0 if not visible.
Show example
Hides the held tablet prop entity briefly during a custom cutscene.
CreateThread(function()
Wait(750)
local prop = exports['agency-pad']:GetPadPropEntity()
if prop ~= 0 and DoesEntityExist(prop) then
SetEntityVisible(prop, false, false)
end
end)IsPadExpanded()Alias of IsPadOpen() kept for backward compatibility.
Show example
Legacy alias used to gate a minigame while the tablet is open.
AddEventHandler('myresource:client:beforeMinigame', function()
if exports['agency-pad']:IsPadExpanded() then
return
end
TriggerEvent('myresource:client:startMinigame')
end)HasCarrierContract()Returns true when the player has an active carrier data plan on the tablet.
Show example
Warns the player if no carrier data plan is currently active on the tablet.
RegisterCommand('checkpaddata', function()
if not exports['agency-pad']:HasCarrierContract() then
TriggerEvent('chat:addMessage', { args = { 'No tablet data plan, buy one in Settings' } })
end
end)GetPadState()Returns table { isOpen, poweredOn, syncEnabled } summarising current tablet status.
Show example
Caches tablet state on the server only when it is open and powered on.
AddEventHandler('myresource:saveSession', function()
local state = exports['agency-pad']:GetPadState()
if state.isOpen and state.poweredOn then
TriggerServerEvent('myresource:server:cachePadState', state)
end
end)HasPad()Returns true if the player has the configured tablet item in their inventory.
Show example
Blocks a dispatch UI command unless the player carries the tablet item.
RegisterCommand('opendispatch', function()
if not exports['agency-pad']:HasPad() then
TriggerEvent('chat:addMessage', { args = { 'You need a tablet first' } })
return
end
TriggerEvent('myresource:client:openDispatch')
end)RegisterAgencyPayPoint(id, data)Registers a runtime Agency Pay terminal at a coordinate (markers, blip, checkout payload).
Show example
Spawns a runtime Agency Pay terminal at the hospital lobby for billing.
CreateThread(function()
exports['agency-pad']:RegisterAgencyPayPoint('hospital_lobby', {
coords = vector3(307.7, -1433.4, 30.0),
label = 'Hospital Bill',
amount = 500,
receiver = 'medical'
})
end)RemoveAgencyPayPoint(id)Removes a previously registered Agency Pay terminal by id.
Show example
Removes a registered tablet pay point when its location closes.
AddEventHandler('myresource:onLocationClosed', function(locationId)
exports['agency-pad']:RemoveAgencyPayPoint(locationId)
end)StartAgencyPayCheckout(data)Opens the tablet (if needed) and launches an Agency Pay checkout flow with the given payment payload.
Show example
Opens the tablet and starts an Agency Pay checkout for property tax.
RegisterCommand('paybill', function()
exports['agency-pad']:StartAgencyPayCheckout({
amount = 1500,
receiver = 'gov_taxes',
label = 'Property tax',
memo = 'Quarterly tax'
})
end)StartCall(contactData)Starts an outgoing tablet call to the supplied contact ({ name, number, ... }).
Show example
Starts an outgoing tablet call when a dispatch event arrives.
RegisterNetEvent('myresource:client:dispatchOnTablet', function(payload)
exports['agency-pad']:StartCall({
name = payload.name or 'Field Agent',
number = payload.number,
anonymous = false
})
end)PhoneNotification(title, text, icon, color, timeout, acceptIcon, denyIcon)Shows an action notification with accept/deny buttons; blocks until the user responds and returns true/false.
Show example
Shows a blocking accept/deny tablet notification to start a delivery mission.
CreateThread(function()
local accepted = exports['agency-pad']:PhoneNotification(
'Mission ready', 'Start the delivery now?', 'box', '#3399ff', 12000, 'check', 'x'
)
if accepted then
TriggerServerEvent('myresource:server:startDelivery')
end
end)Server exports
SendMail(identifier, mailData)Sends a mail to the player's primary mailbox by identifier (returns success).
Show example
Sends an invoice notification mail to a player by their identifier.
RegisterNetEvent('myresource:server:sendInvoiceMail', function(targetId)
local identifier = GetPlayerIdentifier(targetId, 0)
exports['agency-pad']:SendMail(identifier, {
sender = '[email protected]',
subject = 'New invoice available',
body = 'Open the tablet to review your invoice.'
})
end)usePad(event, item, inventory, slot, data)ox_inventory hook registered when ESX+ox_inventory is detected; opens the tablet for the inventory holder.
Show example
Hooks ox_inventory to open the tablet via the integration helper.
exports.ox_inventory:registerHook('usingItem', function(payload)
if payload.item.name ~= 'tablet' then return end
return exports['agency-pad']:usePad('inventory', payload.item, payload.inventory, payload.slot)
end, { itemFilter = { tablet = true } })usePhone(event, item, inventory, slot, data)ox_inventory hook for the legacy phone item id; opens the tablet for the inventory holder.
Show example
Routes the legacy phone inventory item to open the tablet UI instead.
exports.ox_inventory:registerHook('usingItem', function(payload)
if payload.item.name ~= 'phone' then return end
return exports['agency-pad']:usePhone('inventory', payload.item, payload.inventory, payload.slot)
end, { itemFilter = { phone = true } })Events
agency-pad:client:notifyShows a tablet notification (title, text, icon, color, timeout, silent).
Show example
Fires a non-blocking tablet toast about a newly unlocked mission.
TriggerEvent('agency-pad:client:notify', 'Job update', 'New mission unlocked', 'briefcase', '#22cc88', 5000, false)agency-pad:client:usePadItemOpens the tablet when the inventory item is used.
Show example
Forwards a custom inventory item-use event to the tablet open flow.
AddEventHandler('myresource:client:onItemUsed', function(itemName)
if itemName == 'tablet' then
TriggerEvent('agency-pad:client:usePadItem')
end
end)agency-pad:client:openAppTrigger on the client to open a specific app inside the tablet.
Show example
Jumps the tablet straight to a custom fleet management app.
RegisterCommand('openfleet', function()
TriggerEvent('agency-pad:client:openApp', 'fleet')
end)agency-pad:client:newMailNotifyNotifies the client of a freshly received mail.
Show example
Listens for new tablet mail notifications and logs them locally.
AddEventHandler('agency-pad:client:newMailNotify', function(mail)
print(('Tablet mail from %s: %s'):format(mail.sender, mail.subject))
end)agency-pad:client:hourlyPaycheckNotifies the client of an hourly business paycheck event.
Show example
Reacts to an hourly business paycheck event from the tablet.
AddEventHandler('agency-pad:client:hourlyPaycheck', function(payload)
print(('Hourly paycheck: $%s from %s'):format(payload.amount, payload.businessName))
end)agency-pad:server:requestPadDataRequests a fresh tablet data sync for the calling player.
Show example
Asks the server to push a fresh tablet data sync to the player.
RegisterCommand('refreshpad', function()
TriggerServerEvent('agency-pad:server:requestPadData')
end)agency-pad:server:sendMessageSends an SMS message (newMsg, targetNumber).
Show example
Sends an SMS from the tablet via a custom command and number argument.
RegisterCommand('quicksmsTab', function(_, args)
local target, msg = args[1], table.concat(args, ' ', 2)
TriggerServerEvent('agency-pad:server:sendMessage', { message = msg }, target)
end)agency-pad:server:airdropPayPerforms an Agency Airdrop pay-to-nearby-player transfer.
Show example
Triggers an Agency Airdrop transfer to nearby players from the tablet.
RegisterCommand('airdroppad', function(_, args)
local amount = tonumber(args[1]) or 0
TriggerServerEvent('agency-pad:server:airdropPay', amount, 'Tablet airdrop')
end)agency-pad:server:buyDataPlanBuys a carrier data plan for the player.
Show example
Buys a chosen tablet data plan after the player picks one in a custom UI.
AddEventHandler('myresource:client:padPlanSelected', function(plan)
TriggerServerEvent('agency-pad:server:buyDataPlan', plan.price, plan.name)
end)agency-pad:dispatch:createCreates a tablet dispatch from an emergency call/SMS.
Show example
Generates a tablet dispatch entry from an incoming emergency call.
RegisterNetEvent('myresource:server:padDispatchFromCall', function(payload)
TriggerEvent('agency-pad:dispatch:create', {
source = source,
coords = payload.coords,
type = 'medical',
title = 'Medical assistance'
})
end)agency-pad:server:biz:createCreates a new business/organisation for the player.
Show example
Creates a new business entry from a custom in-game command.
RegisterCommand('startbiz', function()
TriggerServerEvent('agency-pad:server:biz:create', {
name = 'Bennys Repair',
type = 'mechanic',
location = 'sandy_shores'
})
end)agency-pad:server:biz:adminCreateAdmin creates a business on behalf of another player.
Show example
Forwards an admin command to create a business on behalf of another player.
RegisterNetEvent('myresource:server:adminCreateBiz', function(targetSrc, payload)
TriggerEvent('agency-pad:server:biz:adminCreate', targetSrc, payload)
end)agency-pad:server:biz:startMissionStarts a configured business mission for the player.
Show example
Starts a configured business mission for the calling player.
RegisterCommand('bizmission', function()
TriggerServerEvent('agency-pad:server:biz:startMission', {
bizId = 12,
missionId = 'delivery_route_a'
})
end)agency-pad:server:applyToListingSubmits a job application to a business listing.
Show example
Submits a job application to a tablet business listing by id.
RegisterCommand('apply', function(_, args)
local listingId = tonumber(args[1])
TriggerServerEvent('agency-pad:server:applyToListing', listingId, {
coverNote = 'Available immediately'
})
end)agency-pad:server:createMechanicInvoiceCreates a mechanic invoice draft.
Show example
Creates a draft mechanic invoice for a vehicle plate and amount.
RegisterCommand('mechinvoice', function(_, args)
TriggerServerEvent('agency-pad:server:createMechanicInvoice', {
plate = args[1],
amount = tonumber(args[2]) or 250,
notes = 'Brake replacement'
})
end)agency-pad:server:sendMechanicInvoicePaySends a mechanic invoice to a customer for payment.
Show example
Sends a finalized mechanic invoice to the customer for payment.
AddEventHandler('myresource:client:onInvoiceConfirmed', function(invoice)
TriggerServerEvent('agency-pad:server:sendMechanicInvoicePay', invoice.id, invoice.targetSrc)
end)agency-pad:server:mdtCreateInvoiceMDT creates a fine/invoice for a citizen.
Show example
Creates an MDT fine/invoice for a citizen from a custom net event.
RegisterNetEvent('myresource:server:mdtFine', function(targetSrc, amount, reason)
TriggerEvent('agency-pad:server:mdtCreateInvoice', {
target = targetSrc,
amount = amount,
reason = reason,
officer = source
})
end)03Agency-Watch
A real smartwatch for FiveM, not a HUD. AgencyOS 26.5 on the wrist: six watch faces, seven cases, activity rings with a daily step goal, stopwatch, timer, alarm, weather, compass, speedometer, a control centre and an app store where players install, reorder and delete apps themselves. Everything listed so far runs on its own, without any other resource. A detected Agency Phone unlocks calls, messages, mail, contacts and Agency Pay on the wrist. That verdict is reached server-side through an HMAC handshake with the genuine phone, so a copied resource cannot fake it. Fall detection brings the watch out by itself after a crash or a long fall and offers an emergency call, with or without a phone. Free, QBCore / Qbox / ESX / standalone with auto-detection, ten languages, and not a single font or icon loaded from the internet.
Client exports
OpenWatch(mitte)Opens the watch. Pass true to open it centred on screen instead of in its configured corner.
CloseWatch()Closes the watch and releases the NUI focus.
ToggleWatch()Closes the watch if it is open, opens it otherwise.
IsWatchOpen()Returns true while the watch UI is on screen.
IsWatchLinked()Returns false when the player switched the link to the Agency Phone off in the control centre.
RunWatchAction()Triggers whatever is bound to the orange action button (Config.ActionButton).
GetWatchSettings()Returns the full settings table the watch UI is built from (theme, face, size, apps, locale).
SetWatchSetting(key, value)Sets a single setting, saves it per character and applies it right away.
SetWatchSettings(table)Sets several settings at once and rebuilds the UI a single time instead of once per value.
RequestWatchPairing()Asks the server for a Companion app pairing code. The answer arrives as an event, not as a return value.
ShowUpdate()Opens the software-update screen of AgencyOS.
HandlesDeath()Returns true when the watch shows the emergency screen on death. The Agency Phone asks this so both devices never show it at once.
GetFitness()Returns the current fitness values: steps, distance, active minutes and calories of the running day.
Server exports
IsPremium(src)Returns true when this player's watch runs in the Pro version. The verdict comes from the handshake with the genuine Agency Phone, never from the client.
04Agency-LifeinvaderV3
Modern advertisement system with tiered pricing, ad queue, and admin approval.
Use as the in-game replacement for Twitter/Instagram. Perfect for businesses advertising new products, gangs announcing territory, or the admin team posting server news.
Events
agency_lifeinvader:showAdShows an ad to the player (broadcast helper).
Show example
Broadcasts a community event ad notification to every player on the server.
-- Push a server-wide announcement ad to every player on event start
local ad = { author = 'Event Crew', text = 'Drag race at airport in 5min!', category = 'event' }
TriggerClientEvent('agency_lifeinvader:showAd', -1, ad)agency_lifeinvader:openMenuOpens the "create ad" menu.
Show example
Opens the Lifeinvader main ad creation menu after the phone app is bought.
-- Open the ad creation menu when the player buys a phone app
TriggerClientEvent('agency_lifeinvader:openMenu', src)agency_lifeinvader:openRecentMenuOpens the "recent ads" feed.
Show example
Opens the recent ads feed menu after a contact tap in the phone app.
-- Open the recent ads feed after a contact tap in the phone app
TriggerClientEvent('agency_lifeinvader:openRecentMenu', src)agency_lifeinvader:notifyShows a framework notification on the player's screen (message, type).
Show example
Shows a framework notification when the player's queued ad is approved.
-- Notify the player when their queued ad gets reviewed by staff
TriggerClientEvent('agency_lifeinvader:notify', src, 'Your ad was approved!', 'success')agency_lifeinvader:submitAdSubmit a new ad from code (used by UI, can be re-used).
Show example
Submits a vehicle sale ad with five repetitions every 60 seconds.
-- Submit a vehicle sale ad from a custom dealership UI
TriggerServerEvent('agency_lifeinvader:submitAd', '2018 Pegassi Emperor for sale', 5, 60, 'vehicles', { vehicle = 'emperor2' })05Agency-Blackmarket
Reputation-based black market with hacking, flash sales, vehicle trading, and money laundering.
Plug into your own robbery, heist or drug-dealing scripts, let the player sell stolen items here or launder their dirty cash before it becomes clean money.
Events
blackmarket:client:openMenuOpens the main black market menu.
Show example
Opens the black market dealer main menu for the player after a job payout.
-- Custom dealer NPC opens the black market menu when its job pays out
TriggerClientEvent('blackmarket:client:openMenu', src)blackmarket:client:closeMenuCloses any open black market menus for the player.
Show example
Closes any open black market menus when the player gets cuffed by police.
-- Force-close menu when player gets cuffed by police
TriggerClientEvent('blackmarket:client:closeMenu', suspectSrc)blackmarket:client:openLaunderingMenuOpens the money laundering submenu.
Show example
Opens the money laundering submenu for the player after a successful heist.
-- Heist crew NPC opens money laundering submenu after a successful job
TriggerClientEvent('blackmarket:client:openLaunderingMenu', src)blackmarket:client:showNotificationDisplays a styled black market notification (title, message, type, duration).
Show example
Displays a styled black market notification about a new shipment in town.
-- Drop a black-market styled notification when product enters the city
TriggerClientEvent('blackmarket:client:showNotification', -1, 'Dealer', 'New shipment in town', 'info', 6000)blackmarket:server:checkAccessChecks the player's current access level.
Show example
Checks if the calling player can access the black market and gets reputation.
-- Storefront NPC checks if player can access the black market before opening
TriggerServerEvent('blackmarket:server:checkAccess')blackmarket:server:completeBuyFinalises a purchase after the client minigame succeeds.
Show example
Finalises a black market purchase after the client minigame succeeds.
-- Finalise a buy after the lockpick minigame succeeds
TriggerServerEvent('blackmarket:server:completeBuy', 'weapon_pistol', 1, 8500)blackmarket:server:sellItemProcesses an item sale.
Show example
Starts the sell flow for a stolen rolex with optional minigame and cooldown.
-- Trigger the sell flow with optional minigame for a stolen item
TriggerServerEvent('blackmarket:server:sellItem', 'rolex', 1)blackmarket:server:completeSellFinalises a sale after the client minigame succeeds.
Show example
Finalises the sale after the client haggle minigame succeeds.
-- Finalise a sale after the haggle minigame succeeds
TriggerServerEvent('blackmarket:server:completeSell', 'rolex', 1, 4250)blackmarket:server:launderMoneyHandles a money-laundering transaction.
Show example
Launders dirty drug-trafficking money into clean cash with fees and extortion.
-- Launder dirty cash earned from drug trafficking
TriggerServerEvent('blackmarket:server:launderMoney', 'dirty_money', 25000)06Agency-Minerjob
Multi-framework mining job with 100-level skill progression, ox_lib skill checks and 6 ore types.
Great as a low-entry job for fresh players. Tie its XP progression to gang reputation, whitelist jobs, or use it as a sink for unemployed players.
Events
agency_minerJob:openSellMenuOpens the sell menu at the ore refinery.
Show example
Opens the trader sell menu so the player can sell their mined ores.
-- Open the trader sell menu for the local player
TriggerEvent('agency_minerJob:openSellMenu')agency_minerJob:sellItemsSells all ores at once at current market price.
Show example
Sells every unit of the named ore at the current dynamic trader price.
-- Sell every copper ore in the player's inventory at current price
TriggerServerEvent('agency_minerJob:sellItems', 'copper')agency_minerJob:requestPlayerItemsReturns the player's sellable mining items via receivePlayerItems.
Show example
Asks the server for the list of ores the player can sell to the trader.
-- Ask server which ores are sellable; reply comes via receivePlayerItems
TriggerServerEvent('agency_minerJob:requestPlayerItems')agency_minerJob:requestPlayerSkillReturns a quick mining skill summary via receiveSkillInfo.
Show example
Requests a quick mining skill summary returned via receiveSkillInfo.
-- Refresh the HUD widget with the current mining level/xp
TriggerServerEvent('agency_minerJob:requestPlayerSkill')agency_minerJob:requestDetailedStatsReturns the detailed mining stats payload via receiveDetailedStats.
Show example
Requests the detailed mining stats and opens the stats menu via receiveDetailedStats.
-- Open the detailed stats panel after admin command
TriggerServerEvent('agency_minerJob:requestDetailedStats')07Agency-Repairkits
Vehicle repair kit with progressive damage mechanics and modern UI.
Perfect inside mechanic jobs, tow-truck jobs, or as a consumable item in a general inventory. The progressive damage system pairs beautifully with a chop-shop or insurance script.
Events
agencyrepairkit:client:startRepairStarts the repair animation & progress bar on the target vehicle.
Show example
Universal trigger to start the repair-kit progress flow on the player's vehicle.
-- Universal trigger when player uses a custom 'repair' button
TriggerEvent('agencyrepairkit:client:startRepair')esx-agencyrepairkit:client:useRepairKitESX-specific alias that starts the repair-kit progress flow.
Show example
ESX-specific alias that starts the repair-kit progress flow on the player's vehicle.
-- Use this alias from your ESX item handler
TriggerEvent('esx-agencyrepairkit:client:useRepairKit')qb-agencyrepairkit:client:useRepairKitQBCore-specific alias that starts the repair-kit progress flow.
Show example
QBCore-specific alias that starts the repair-kit progress flow on the vehicle.
-- QBCore item callback can use this alias directly
TriggerEvent('qb-agencyrepairkit:client:useRepairKit')08Agency-Vehiclekeys
Vehicle keys with lock/unlock, remote engine start, blinkers and key sharing.
Works as the "owns this vehicle" check for every other script, tow trucks, impound lots, valet parking, carjacking minigames. The validate export is safe to call from any other resource.
Events
simple_carkeys:client:toggleLockToggles lock state of the vehicle (respecting ownership).
Show example
Networked lock toggle with key-fob animation, lights and sound for the initiator.
-- Sync lock toggle to all clients near a tow truck
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
TriggerEvent('simple_carkeys:client:toggleLock', vehicle)simple_carkeys:client:toggleEngineRemote-starts or stops the targeted vehicle's engine.
Show example
Networked engine on/off toggle for the supplied vehicle entity.
-- Cut the engine remotely on the vehicle the player just left
local lastVeh = GetVehiclePedIsIn(PlayerPedId(), true)
TriggerEvent('simple_carkeys:client:toggleEngine', lastVeh)simple_carkeys:client:showErrorShows a generic 'not your car' error notification on the client.
Show example
Shows a generic 'not your car' error notification on the client.
-- Show the standard 'not your car' notification on a failed lockpick
TriggerEvent('simple_carkeys:client:showError')simple_carkeys:client:showNotificationTextShows a success notification with arbitrary text on the client.
Show example
Shows a success notification with arbitrary text on the client.
-- Tell the player the engine started OK after a custom hotwire script
TriggerEvent('simple_carkeys:client:showNotificationText', 'Engine started')simple_carkeys:client:showErrorTextShows an error notification with arbitrary text on the client.
Show example
Shows an error notification with arbitrary text on the client.
-- Block engine start when fuel is empty
TriggerEvent('simple_carkeys:client:showErrorText', 'Out of fuel')simple_carkeys:server:forceToggleLockJob/admin path: broadcasts a lock toggle for a vehicle without ownership checks.
Show example
Job/admin path: broadcasts a lock toggle for a vehicle without ownership checks.
-- Police impound forces an unlock without ownership checks
TriggerServerEvent('simple_carkeys:server:forceToggleLock', VehToNet(vehicle))simple_carkeys:server:forceToggleEngineJob/admin path: broadcasts an engine toggle for a vehicle without ownership checks.
Show example
Job/admin path: broadcasts an engine toggle for a vehicle without ownership checks.
-- Ambulance script force-starts a parked car for an evac mission
TriggerServerEvent('simple_carkeys:server:forceToggleEngine', VehToNet(vehicle))simple_carkeys:server:checkOwnershipAndLockValidates ownership/shared keys for the plate then broadcasts a lock toggle on success.
Show example
Validates ownership/shared keys for the plate then broadcasts a lock toggle on success.
-- Player presses L; verify ownership before locking the vehicle
TriggerServerEvent('simple_carkeys:server:checkOwnershipAndLock', 'AB12XYZ', VehToNet(vehicle))simple_carkeys:server:checkOwnershipAndStartValidates ownership/shared keys for the plate then broadcasts an engine toggle on success.
Show example
Validates ownership/shared keys for the plate then broadcasts an engine toggle on success.
-- Validate then start engine on the vehicle the player is in
TriggerServerEvent('simple_carkeys:server:checkOwnershipAndStart', 'AB12XYZ', VehToNet(vehicle))simple_carkeys:server:universalEngineStartAllows any player to start any engine when Config.AllowUniversalEngineStart is enabled.
Show example
Allows any player to start any engine when Config.AllowUniversalEngineStart is enabled.
-- Hotwire mini-game success: any player starts any engine when allowed in config
TriggerServerEvent('simple_carkeys:server:universalEngineStart', VehToNet(vehicle))09Agency-Vending
Vending machines with player ownership, cash or AgencyPay card payment.
Pair with Agency-Phone's AgencyPay export for card-based purchases. Use in jobs where players own vending locations (gas stations, offices, apartments) to generate passive income.
Events
agency-vending:notifyGeneric server-driven notification dispatcher for the vending resource.
Show example
Sends a generic vending-themed notification to the player after a purchase.
-- Plug a vending receipt into a custom logger via notify event
TriggerClientEvent('agency-vending:notify', src, 'success', 'Receipt #4821 saved to wallet')agency-vending:startAgencyPayInitiates an Agency Pay checkout via the agency-phone integration with merchant metadata.
Show example
Initiates an Agency Pay checkout via the phone with the kiosk's merchant data.
-- Pop a phone Agency Pay flow when a player taps a kiosk
TriggerClientEvent('agency-vending:startAgencyPay', src, { merchant = 'Sprunk Co', amount = 4.50, ref = 'flash_sale_01' })agency-vending:buyMachineResultResult of a buy-machine purchase, forwarded to the NUI for feedback.
Show example
Forwards a buy-machine purchase result to a custom shop NUI for feedback.
-- Forward buy-machine outcome to a custom shop UI
TriggerClientEvent('agency-vending:buyMachineResult', src, { success = true, machineId = 102 })agency-vending:machineCreatedBroadcast that a new player-owned machine was created; updates local cache and notifies owner.
Show example
Broadcasts a freshly created player-owned vending machine to all clients.
-- Cache new owner-machine instantly when business script registers it
TriggerClientEvent('agency-vending:machineCreated', -1, { id = 142, owner = identifier, type = 'sprunk' })agency-vending:openManagementVerifiedServer-verified open of the owner management menu with items, earnings and label.
Show example
Opens the verified management UI with items, earnings and label after auth.
-- After server-side ownership check open management menu with stock
TriggerClientEvent('agency-vending:openManagementVerified', src, { items = items, earnings = 1240, label = 'East LS Sprunk' })agency-vending:openOwnedListOpens the owner overview NUI listing all of the player's machines with street names.
Show example
Opens the owner overview NUI listing all of the player's vending machines.
-- Hotkey opens the owner overview NUI listing all owned machines
TriggerClientEvent('agency-vending:openOwnedList', src)agency-vending:spawnMachineCreatedAdmin-spawner broadcast that a new spawned machine entity was created.
Show example
Notifies all clients that an admin spawned a new vending machine entity.
-- Custom mapping tool tracks newly admin-spawned machine
TriggerClientEvent('agency-vending:spawnMachineCreated', -1, { entity = netId, model = 'prop_vend_soda_01', id = 7 })agency-vending:spawnMachineDeletedAdmin-spawner broadcast that a spawned machine entity was deleted.
Show example
Tells all clients that an admin deleted a previously spawned vending machine.
-- Mapping tool removes a deleted spawned machine from cache
TriggerClientEvent('agency-vending:spawnMachineDeleted', -1, 7)agency-vending:openSpawnerUIOpens the admin spawner NUI after server-side permission check passes.
Show example
Opens the admin spawner NUI for placing world vending machines.
-- Custom command opens the admin spawner UI after permission passes
TriggerClientEvent('agency-vending:openSpawnerUI', src)agency-vending:buyMachinePlayer buys a vending machine of a given type at the supplied coords/heading.
Show example
Player buys a sprunk-type vending machine at their current coords from an NPC.
-- Custom NPC sells vending machines via dialog
local coords = GetEntityCoords(PlayerPedId())
local heading = GetEntityHeading(PlayerPedId())
TriggerServerEvent('agency-vending:buyMachine', 'sprunk', coords, heading)agency-vending:requestOwnedListCaller requests the list of their owned machines for the owner overview UI.
Show example
Requests the list of the player's owned vending machines from the server.
-- Refresh owner overview after a balance/restock action elsewhere
TriggerServerEvent('agency-vending:requestOwnedList')agency-vending:requestMachinesCaller requests a full sync of all player-owned machines from the server.
Show example
Requests a fresh full sync of all player-owned vending machines from server.
-- Scan for nearby machines after teleport finished
TriggerServerEvent('agency-vending:requestMachines')agency-vending:requestManagementServer-verified open of the management UI for an owned machine.
Show example
Requests server-verified management UI for the clicked owned vending machine.
-- Owner UI requests verified management menu for a clicked machine
TriggerServerEvent('agency-vending:requestManagement', machineId)agency-vending:requestSpawnedMachinesCaller requests the list of admin-spawned machines for the spawner UI.
Show example
Requests the list of all admin-spawned vending machines for the spawner UI.
-- Admin spawner UI fetches all currently spawned machines
TriggerServerEvent('agency-vending:requestSpawnedMachines')agency-vending:adminSpawnMachineAdmin places a new vending machine prop server-side after permission check.
Show example
Admin spawns a new snack-type vending machine prop after a permission check.
-- Admin places a snack machine via custom slash command
TriggerServerEvent('agency-vending:adminSpawnMachine', 'snack', vector3(120.5, -1280.7, 29.3), 90.0)agency-vending:adminDeleteSpawnedAdmin deletes a previously spawned vending machine prop server-side.
Show example
Admin removes a previously spawned vending machine prop server-side.
-- Admin removes a misplaced machine via map editor button
TriggerServerEvent('agency-vending:adminDeleteSpawned', spawnedId)10Agency-Admin
Full-featured admin panel with glass UI, AgencyAI chat, and 60+ admin tools.
The events are perfect as "primitives" for anti-cheat, moderation bots, or automated enforcement tools, call them from your server script to freeze/kick/notify without writing your own UI.
Events
agency-admin:client:refreshStaffRanksTriggers the client to re-pull staff ranks data.
Show example
Refreshes the staff ranks cache for every online admin after a promotion.
-- After auto-promotion, refresh staff ranks for all online admins
for _, src in ipairs(GetPlayers()) do
TriggerClientEvent('agency-admin:client:refreshStaffRanks', tonumber(src))
endagency-admin:client:freezeTimeFreezes / unfreezes the world time on the client at the given hour/minute.
Show example
Anti-cheat freezes the world clock at noon while reviewing a player.
-- Anti-cheat halts world time during an investigation
local hour, minute = 12, 0
TriggerClientEvent('agency-admin:client:freezeTime', src, true, hour, minute)agency-admin:client:dashboardValuePushes a single dashboard card value (e.g. live counter) to the panel UI.
Show example
Pushes the live online player count to the admin dashboard card.
-- Stream live online player count to admin dashboard cards
local count = #GetPlayers()
TriggerClientEvent('agency-admin:client:dashboardValue', adminSrc, 'players_online', count)agency-admin:client:teleportToCoordsTeleports the caller to the supplied world coordinates.
Show example
Teleports a player to the saved coordinates after a respawn event.
-- Job script teleports a player back to last save point on respawn
local coords = vector3(-1037.7, -2737.6, 20.16)
TriggerClientEvent('agency-admin:client:teleportToCoords', src, coords)agency-admin:client:announceShows a server-wide announcement banner.
Show example
Broadcasts a server-wide announcement banner from a named system sender.
-- Event bot announces a community contest start
TriggerClientEvent('agency-admin:client:announce', -1, 'Event Crew', 'Heist contest starts in 5 minutes!')agency-admin:client:notifyPushes a notification to a specific admin.
Show example
Sends a styled notification to the player when their application is approved.
-- Whitelist bot informs a player they passed the application
TriggerClientEvent('agency-admin:client:notify', src, 'Whitelist', 'Application approved!', 'success', 8000)agency-admin:client:freezeFreezes the target player in place.
Show example
Freezes a suspect player so staff can investigate without them moving.
-- Anti-cheat freezes a suspect player while staff investigates
TriggerClientEvent('agency-admin:client:freeze', suspectSrc, true)agency-admin:client:healRestores target's HP/armor.
Show example
Fully heals the patient after their RP medical treatment finishes.
-- Medic job script fully heals the player after RP treatment ends
TriggerClientEvent('agency-admin:client:heal', patientSrc)agency-admin:client:reviveRevives the target player.
Show example
Revives a downed player after the EMS minigame is successfully completed.
-- EMS revive minigame succeeds, server marks player alive again
TriggerClientEvent('agency-admin:client:revive', downedSrc)agency-admin:client:teleportTeleports the local player to the supplied coords vector.
Show example
Teleports the local player to the supplied coordinates vector.
-- Tutorial system teleports new player to spawn pad on first join
local coords = vector3(245.7, -871.5, 30.5)
TriggerClientEvent('agency-admin:client:teleport', src, coords)agency-admin:client:openMenuOpens the admin panel UI (requires ACE permission).
Show example
Opens the main admin panel UI for the staff member when they go on duty.
-- Auto-open admin panel for staff right after they switch on duty
TriggerClientEvent('agency-admin:client:openMenu', src)agency-admin:client:openToolsMenuServer-driven trigger to open the admin tools sub-menu.
Show example
Opens the admin tools sub-menu when the staff hotkey is pressed.
-- Quick-action keybind opens the admin tools sub-menu
TriggerClientEvent('agency-admin:client:openToolsMenu', src)agency-admin:client:closeMenuServer-driven trigger to close the admin panel UI.
Show example
Force-closes the admin panel UI when the admin is being investigated.
-- Force-close the panel when admin gets reported themselves
TriggerClientEvent('agency-admin:client:closeMenu', adminSrc)agency-admin:client:openClothingMenuServer-driven trigger to open the in-game clothing menu for the player.
Show example
Opens the clothing menu after the player buys an outfit from a tailor.
-- Tailor NPC opens clothing menu after a uniform purchase
TriggerClientEvent('agency-admin:client:openClothingMenu', src)agency-admin:server:requestPlayersRequests the current online players list for the admin panel.
Show example
Requests the latest online players list from the server for the panel.
-- Custom dashboard widget refreshes its players list
TriggerServerEvent('agency-admin:server:requestPlayers')agency-admin:server:requestPanelPermissionsRequests the panel permission table for the rank editor.
Show example
Asks the server for the panel permission table used by the rank editor.
-- Permission editor needs the latest panel permission map
TriggerServerEvent('agency-admin:server:requestPanelPermissions')agency-admin:server:requestStaffRanksRequests the staff ranks dataset for the panel.
Show example
Requests the full staff ranks dataset for use in a custom CRM widget.
-- Sync staff ranks dataset into a custom CRM widget
TriggerServerEvent('agency-admin:server:requestStaffRanks')agency-admin:server:createRankCreates a new staff rank with metadata and permissions.
Show example
Creates a new staff rank from an external HR portal sync.
-- Sync rank from external HR portal -> create matching staff rank
TriggerServerEvent('agency-admin:server:createRank', { name = 'Senior Mod', color = '#a855f7', priority = 50 })agency-admin:server:requestMyPermissionsCaller requests their own resolved panel permission set.
Show example
Requests the caller's own resolved panel permission set on UI open.
-- Fetch caller's resolved permission set before showing dev tools
TriggerServerEvent('agency-admin:server:requestMyPermissions')agency-admin:server:requestSyncCaller asks the server to push the standard sync payload (duty/perms/etc.).
Show example
Forces the server to push the standard duty/perms sync payload to the caller.
-- Force a fresh sync after the player reconnects
TriggerServerEvent('agency-admin:server:requestSync')agency-admin:server:requestDutyRankCaller requests their current admin-duty rank info.
Show example
Requests the caller's current admin-duty rank for a custom HUD overlay.
-- Display admin's duty rank on a custom HUD overlay
TriggerServerEvent('agency-admin:server:requestDutyRank')agency-admin:server:requestSpawnedObjectsCaller requests the list of admin-spawned world objects.
Show example
Requests the list of admin-spawned world objects for a minimap overlay.
-- Map editor needs to draw all admin-spawned objects on a minimap
TriggerServerEvent('agency-admin:server:requestSpawnedObjects')11Agency-Reports V2
Modern report system with live chat per report and AI-assisted replies.
Use as a "support ticket" backbone for your whole server. Your custom scripts can auto-open reports when things go wrong (stuck vehicles, duped items, failed SQL saves) for admin review.
Events
agency-reports:client:notifyFires a "new report" notification to a specific admin.
Show example
Server-driven notification respecting the player's UI notification preference.
-- Server tells client a new admin reply landed
TriggerClientEvent('agency-reports:client:notify', source, 'New reply on your report', 'info')agency-reports:client:openPlayerUIOpens the player-side report UI.
Show example
Opens the player report UI with categories, open/recent reports and AI/Discord settings.
-- Open the player report UI on a custom keybind
local categories = { 'Bug', 'Player report', 'Stuck' }
TriggerEvent('agency-reports:client:openPlayerUI', categories, {}, {}, {})agency-reports:client:openAdminUIOpens the admin-side report list.
Show example
Opens the admin reports dashboard with the full reports dataset.
-- Force-open the admin reports dashboard from a staff command
TriggerEvent('agency-reports:client:openAdminUI', { reports = {}, total = 0 })agency-reports:client:teleportTeleports the calling admin to the supplied coordinates (for goto actions).
Show example
Teleports the calling admin to the supplied coordinates for goto actions.
-- Goto-action: teleport the responding admin to the report scene
TriggerEvent('agency-reports:client:teleport', vector3(-247.6, -2010.2, 30.1))agency-reports:client:healSelfFully heals the calling admin's ped.
Show example
Fully heals the calling admin's ped after responding to a report.
-- Heal admin after a hostile scene to keep them in service
TriggerEvent('agency-reports:client:healSelf')agency-reports:server:submitReportSubmits a new report from outside the UI.
Show example
Player submits a new report with title, category and description to the database.
-- Player submits a quick stuck-at-pier report
TriggerServerEvent('agency-reports:server:submitReport', 'Stuck at pier', 'Stuck', 'Vehicle wedged under pier - cant move')agency-reports:server:requestPlayerDataCaller requests their own report payload; optionally opens the player UI on response.
Show example
Caller requests their own report payload, optionally opening the player UI in response.
-- Pull fresh data and (optionally) auto-open the player UI
TriggerServerEvent('agency-reports:server:requestPlayerData', true)agency-reports:server:requestAdminDataAdmin requests the full reports dataset and opens the admin dashboard if permitted.
Show example
Admin requests the full reports dataset and opens the admin dashboard if permitted.
-- Admin staff opens the dashboard after going on duty
TriggerServerEvent('agency-reports:server:requestAdminData')agency-reports:server:sendChatMessageSends a chat message to an open report.
Show example
Posts a chat message in a specific report thread for admin or player.
-- Player posts a follow-up chat message into report #42
TriggerServerEvent('agency-reports:server:sendChatMessage', 42, 'Still stuck, any ETA?')12Agency-Hud
Animated HUD with vehicle dashboard, status bars, speedometer and seatbelt integration.
If you have a custom economy or needs-system, drive the HUD from your own script with these setters instead of hacking around it. The HUD handles animation and persistence for you.
Client exports
GetVehicleSettings()Returns the current vehicle settings table.
Show example
Reads the local vehicle HUD settings table for inspection or syncing.
local settings = exports['Agency-Hud']:GetVehicleSettings()
print('Speed unit:', settings.speedUnit)
print('HUD scale:', settings.scale)SetSpeedUnit(unit: string)Switches speedometer between 'mph' and 'kmh'.
Show example
Switches the vehicle speedometer to miles per hour and saves locally.
RegisterCommand('usemph', function()
exports['Agency-Hud']:SetSpeedUnit('mph')
end)SetHunger(value: number)Sets the hunger bar value (0-100).
Show example
Pushes the player's current hunger level into the HUD.
AddEventHandler('player:hungerChanged', function(value)
exports['Agency-Hud']:SetHunger(value)
end)SetThirst(value: number)Sets the thirst bar value (0-100).
Show example
Pushes the player's current thirst level into the HUD.
AddEventHandler('player:thirstChanged', function(value)
exports['Agency-Hud']:SetThirst(value)
end)SetStress(value: number)Sets the stress bar value (0-100).
Show example
Updates the HUD stress meter from a custom stress system.
AddEventHandler('jobstress:onTick', function(stress)
exports['Agency-Hud']:SetStress(stress)
end)SetMoney(value: number)Sets the displayed cash balance.
Show example
Updates the cash amount displayed on the HUD wallet panel.
AddEventHandler('wallet:cashChanged', function(cash)
exports['Agency-Hud']:SetMoney(cash)
end)SetBank(value: number)Sets the displayed bank balance (for custom economy scripts).
Show example
Updates the bank balance value rendered in the HUD.
AddEventHandler('bank:balanceChanged', function(balance)
exports['Agency-Hud']:SetBank(balance)
end)SetJob(label: string)Sets the displayed job label.
Show example
Sets the displayed job label after the player changes occupation.
AddEventHandler('job:onChange', function(job)
exports['Agency-Hud']:SetJob(job.label)
end)SetRank(rank: string)Sets the displayed job rank/grade.
Show example
Updates the player rank string shown beside the job label.
AddEventHandler('job:onGradeChange', function(grade)
exports['Agency-Hud']:SetRank(grade.label)
end)GetDetectedFramework()Returns the framework string ("qb", "esx", "standalone") the HUD auto-detected.
Show example
Reads the detected framework key for branching custom HUD logic.
local fw = exports['Agency-Hud']:GetDetectedFramework()
if fw == 'qb' then
print('QB-Core detected')
endEvents
Agency-HUD:client:applyVehicleSettingsPatchApplies a partial vehicle-settings patch to local vehicle HUD.
Show example
Applies a partial vehicle HUD settings patch on the local client.
TriggerEvent('Agency-HUD:client:applyVehicleSettingsPatch', {
style = 'modern',
speedUnit = 'kmh'
})Agency-HUD:client:openAdminMenuOpens the HUD admin menu (requires permission).
Show example
Opens the admin HUD menu NUI on the receiving client.
TriggerEvent('Agency-HUD:client:openAdminMenu')Agency-HUD:server:checkAdminPermissionVerifies caller's admin rights and opens the admin menu on success.
Show example
Asks the server to verify admin rights and open the HUD admin menu.
RegisterCommand('checkhudadmin', function()
TriggerServerEvent('Agency-HUD:server:checkAdminPermission')
end)Agency-HUD:server:saveGlobalSettingsAdmin-only persistence of global HUD settings; broadcasts sync.
Show example
Saves a new global HUD configuration (admin only) and broadcasts it.
TriggerServerEvent('Agency-HUD:server:saveGlobalSettings', {
style = 'modern',
accent = '#ff6b00'
})Agency-HUD:server:requestGlobalSettingsReturns current global settings to the requesting client.
Show example
Requests the current global HUD settings on resource start.
AddEventHandler('onClientResourceStart', function(res)
if res == GetCurrentResourceName() then
TriggerServerEvent('Agency-HUD:server:requestGlobalSettings')
end
end)Agency-HUD:server:requestTimeReturns current server time to the caller for the HUD clock.
Show example
Polls the server clock every minute to refresh the HUD time display.
CreateThread(function()
while true do
TriggerServerEvent('Agency-HUD:server:requestTime')
Wait(60000)
end
end)13Agency-Progressbar
Animated progress bar with glass UI, 4 themes, cancellable actions and client/server exports.
Use anywhere you would normally show "doing thing X for Y seconds". Replaces multiple legacy progress-bar resources with a single consistent UI across your whole server.
Client exports
StartProgress(data: table)Starts a progress bar with a full options table. Returns immediately; callbacks fire on completion/cancel.
Show example
Starts an 8 second lockpick progress with animation and finish callback.
exports['Agency-Progressbar']:StartProgress({
label = 'Picking lock...',
duration = 8000,
animation = { dict = 'anim@heists@fleeca_bank@drilling', clip = 'drill_straight_idle' },
onFinish = function() TriggerServerEvent('garage:lockpicked', vehNet) end,
onCancel = function() print('Lockpick cancelled') end
})StopProgress(completed: boolean)Stops the currently running progress bar. Pass true to mark as cancelled.
Show example
Cancels the active progress bar when the player presses X.
if IsControlJustPressed(0, 73) then
exports['Agency-Progressbar']:StopProgress(false)
endIsProgressActive()Returns true if a progress bar is currently shown.
Show example
Prevents starting a new crafting action while a progress bar is active.
if exports['Agency-Progressbar']:IsProgressActive() then
return
end
startCrafting()GetProgressPercentage()Returns the current fill percentage (0-100).
Show example
Triggers a minigame tick once the progress bar is more than 75 percent done.
CreateThread(function()
while exports['Agency-Progressbar']:IsProgressActive() do
local pct = exports['Agency-Progressbar']:GetProgressPercentage()
if pct > 75 then SendMinigameTick() end
Wait(100)
end
end)SetProgressTheme(theme: string)Switches theme at runtime: 'modern', 'neon', 'minimal' or 'classic'.
Show example
Switches the active progress bar appearance to the modern theme.
RegisterCommand('darkbar', function()
exports['Agency-Progressbar']:SetProgressTheme('modern')
end)SetProgressPosition(position: string)Changes position: 'top', 'bottom', 'center'.
Show example
Moves the active progress bar to the bottom-center of the screen.
RegisterCommand('barbottom', function()
exports['Agency-Progressbar']:SetProgressPosition('bottom-center')
end)TryReload(usedItem?: string)Plays the ESX-style reload sequence.
Show example
Initiates a server-validated reload using a 9mm ammo box item.
RegisterKeyMapping('+reload', 'Reload weapon', 'keyboard', 'R')
RegisterCommand('+reload', function()
exports['Agency-Progressbar']:TryReload('ammo-9')
end)UseConsumable(itemName: string, isDrink: boolean)Plays the eat/drink animation with progress bar.
Show example
Plays the drink animation and applies thirst gain when using water.
RegisterNetEvent('inventory:useItem', function(item)
if item == 'water_bottle' then
exports['Agency-Progressbar']:UseConsumable('water_bottle', true)
end
end)Server exports
StartProgressForPlayer(playerId: number, data: table)Trigger a progress bar on a specific client from the server.
Show example
Starts a 5 second lift-crate progress bar on the requesting player.
RegisterCommand('lift', function(source)
exports['Agency-Progressbar']:StartProgressForPlayer(source, {
label = 'Lifting crate...',
duration = 5000
})
end, false)StopProgressForPlayer(playerId: number, completed?: boolean)Cancels a specific player's progress bar remotely.
Show example
Cancels a target player's active progress bar from the server.
RegisterNetEvent('admin:cancelProgress', function(targetId)
exports['Agency-Progressbar']:StopProgressForPlayer(targetId, false)
end)StartProgressForAllPlayers(data: table)Broadcasts a progress bar to every connected client.
Show example
Broadcasts a 30 second storm warning progress bar to every player.
RegisterNetEvent('event:weatherWarning', function()
exports['Agency-Progressbar']:StartProgressForAllPlayers({
label = 'Storm incoming - take shelter',
duration = 30000
})
end)StopProgressForAllPlayers(completed?: boolean)Cancels every player's progress bar (e.g. round end).
Show example
Stops the global storm warning progress bar on every player.
RegisterNetEvent('event:weatherCleared', function()
exports['Agency-Progressbar']:StopProgressForAllPlayers(true)
end)Events
Agency:Progressbar:LoadSettingsLoads per-player UI settings (position, color, scale, style) from DB into the client.
Show example
Loads the player's saved progress bar UI settings on spawn.
AddEventHandler('playerSpawned', function()
TriggerEvent('Agency:Progressbar:LoadSettings')
end)agency-progressbar:client:startStarts the progress bar on the receiving client with the supplied data.
Show example
Starts a 12 second engine repair progress bar that can be cancelled.
TriggerEvent('agency-progressbar:client:start', {
label = 'Repairing engine...',
duration = 12000,
canCancel = true
})agency-progressbar:client:stopStops the active progress bar with a completion flag.
Show example
Aborts the active progress bar when the player gets cuffed.
RegisterNetEvent('police:cuffed', function()
TriggerEvent('agency-progressbar:client:stop', false)
end)agency:consumables:useFoodInventory bridge to consume a food item (animation + secured server apply).
Show example
Triggers the inventory food bridge to consume a sandwich item.
TriggerEvent('agency:consumables:useFood', 'sandwich')agency:consumables:useDrinkInventory bridge to consume a drink item (animation + secured server apply).
Show example
Triggers the inventory drink bridge to consume a coffee cup item.
TriggerEvent('agency:consumables:useDrink', 'coffee_cup')Agency:Progressbar:SaveSettingsValidates and persists the player's progress bar UI settings to the DB.
Show example
Persists the player's progress bar UI preferences to the database.
TriggerServerEvent('Agency:Progressbar:SaveSettings', {
position = 'top-right',
color = '#00aaff',
scale = 1.2
})agency-progressbar:server:startServer-side trigger to start a progress bar on a target (or self).
Show example
Server-side trigger to start a 6 second crate loading bar on a target.
RegisterCommand('movecrate', function(source)
TriggerEvent('agency-progressbar:server:start', source, {
label = 'Loading crate onto truck',
duration = 6000
})
end, false)agency-progressbar:server:stopServer-side trigger to stop a progress bar on a target (or self).
Show example
Server-side trigger to stop a target's progress bar with cancel state.
RegisterNetEvent('admin:abortJob', function(targetId)
TriggerEvent('agency-progressbar:server:stop', targetId, false)
end)agency:reload:requestValidates ammo/weapon/item before granting a reload to the requesting player.
Show example
Asks the server to validate ammo and grant a pistol reload.
TriggerServerEvent('agency:reload:request', 'WEAPON_PISTOL', 'ammo-9')agency:consumables:applyValidates inventory, removes one item and applies hunger/thirst gains.
Show example
Asks the server to remove the food item and apply hunger gains.
RegisterNetEvent('food:onEatStart', function(itemName)
TriggerServerEvent('agency:consumables:apply', itemName)
end)14Agency-Notify
Notification system with V1/V2 styles, AgencyAI smart priority, spam protection and database persistence.
Replace every other notification resource on your server (qb-notify, esx_notify, mythic_notify, okok-notify, etc.) with one consistent look. The AgencyAI priority system auto-rate-limits spammy notifications.
Client exports
Notify(data: { title, text, type, duration, ... })Shows a notification. Accepts { type, title, text, duration, icon, color }.
Show example
Sends a 6 second success notification announcing a heist objective.
exports['Agency-Notify']:Notify({
title = 'Bank Heist',
text = 'Vault drilled, grab the loot!',
type = 'success',
duration = 6000
})Events
Agency:Notify:SendSame as the export, lets you use the legacy Trigger-based pattern.
Show example
Legacy v1 client event that displays the same payload as the export.
TriggerEvent('Agency:Notify:Send', {
title = 'Old Notify',
text = 'Legacy v1 entry point still works',
type = 'info'
})Agency:Notify:LoadSettingsApplies per-player saved UI settings (position, color, scale, style) from the server.
Show example
Loads saved per-player notify UI settings on spawn.
AddEventHandler('playerSpawned', function()
TriggerEvent('Agency:Notify:LoadSettings')
end)Agency:Notify:SaveSettingsValidates and persists the player's notify settings (position, accent, scale, style).
Show example
Persists the player's notify position, accent and scale to the database.
TriggerServerEvent('Agency:Notify:SaveSettings', {
position = 'top-right',
accent = '#ff8800',
scale = 1.1,
style = 'modern'
})15Agency-Seatbelt
Seatbelt with ejection physics, 3D sounds, multi-occupant support and HUD integration.
Plug the state into your own HUD, or force-enable at the start of a police chase / heist escape. The force-enable/disable exports are great for RP moments.
Client exports
enableSeatbelt()Forces the seatbelt on (use e.g. on police arrest).
Show example
Buckles the local player's seatbelt with HUD and sound feedback.
RegisterNetEvent('vehicle:autoBuckle', function()
if IsPedInAnyVehicle(PlayerPedId(), false) then
exports['Agency-Seatbelt']:enableSeatbelt()
end
end)disableSeatbelt()Forces the seatbelt off (cutscenes, rp scenarios).
Show example
Unbuckles the local player's seatbelt when leaving a vehicle.
RegisterNetEvent('vehicle:onExit', function()
exports['Agency-Seatbelt']:disableSeatbelt()
end)toggleSeatbelt()Toggles the seatbelt (what the default keybind does).
Show example
Toggles the local player's seatbelt buckled state on key press.
RegisterKeyMapping('+seatbelt', 'Toggle seatbelt', 'keyboard', 'B')
RegisterCommand('+seatbelt', function()
exports['Agency-Seatbelt']:toggleSeatbelt()
end)isSeatbeltOn()Returns true if the player currently has their seatbelt on.
Show example
Disables the exit-vehicle control while the seatbelt is buckled.
if exports['Agency-Seatbelt']:isSeatbeltOn() then
DisableControlAction(0, 75, true)
end16Agency-Elevator
Realistic elevator system with Liquid Glass UI and a configurator.
Perfect inside apartment/housing scripts, police HQ, hospital, or any multi-floor interior. Use the configurator to place elevators visually without touching config files.
Events
Agency-Elevator:server:requestTravelServer-validated request to travel between floors.
Show example
Asks the server to validate access then travel to floor 3 of an elevator.
TriggerServerEvent('Agency-Elevator:server:requestTravel', 'lspd-tower-1', 3)Agency-Elevator:server:travelCompleteAcknowledges client arrival and pushes the 'arrived at floor' notification.
Show example
Tells the server the player arrived at floor 3 to push the arrival notification.
TriggerServerEvent('Agency-Elevator:server:travelComplete', 'lspd-tower-1', 3)Agency-Elevator:server:requestElevatorsSyncs the loaded elevator list from the database to the requesting client.
Show example
Requests the full elevator list from the server on client init.
AddEventHandler('onClientResourceStart', function(res)
if res == GetCurrentResourceName() then
TriggerServerEvent('Agency-Elevator:server:requestElevators')
end
end)Agency-Elevator:server:saveElevatorPermission-gated upsert of an elevator (id/label/floors) into MySQL.
Show example
Admin upsert of an elevator with a single Lobby floor entry.
TriggerServerEvent('Agency-Elevator:server:saveElevator', {
id = 'lspd-tower-1',
label = 'LSPD HQ',
floors = { { name = 'Lobby', coords = vector3(441.0, -981.5, 30.7) } }
})Agency-Elevator:server:loadElevatorSpawns/loads a saved elevator from the database.
Show example
Loads a single elevator's data into the configurator NUI for editing.
TriggerServerEvent('Agency-Elevator:server:loadElevator', 'lspd-tower-1')Agency-Elevator:server:saveSettingsPersists UI settings (position/scale/accent color) to MySQL and re-syncs all clients.
Show example
Saves elevator UI position, accent color and scale and re-syncs all clients.
TriggerServerEvent('Agency-Elevator:server:saveSettings', {
position = 'top-right',
accent = '#22c55e',
scale = 1.0
})Agency-Elevator:client:startTravelStarts an elevator travel cutscene for the player.
Show example
Plays fade and animation, then teleports the ped to floor 2 of the garage.
TriggerEvent('Agency-Elevator:client:startTravel', 'parking-garage', 2)Agency-Elevator:client:applySettingsPushes UI settings (accent/scale/position) into the NUI.
Show example
Applies elevator NUI accent, scale and position on the local client.
TriggerEvent('Agency-Elevator:client:applySettings', {
accent = '#0ea5e9',
scale = 0.9,
position = 'bottom-left'
})Agency-Elevator:client:openConfiguratorOpens the in-game elevator configurator (admin only).
Show example
Opens the admin configurator NUI with the current elevator list.
TriggerEvent('Agency-Elevator:client:openConfigurator')Agency-Elevator:client:refreshConfiguratorRefreshes the open configurator after a save/delete without closing it.
Show example
Refreshes the open configurator NUI after a save without closing it.
AddEventHandler('Agency-Elevator:server:elevatorSaved', function()
TriggerEvent('Agency-Elevator:client:refreshConfigurator')
end)17Agency-Housing
Database driven housing system for FiveM with auto-detection for ESX, QBCore and QBox. Houses are created in-game through a liquid-glass creator UI instead of a config file: place the entrance where you stand, mark the property border from the air, pick one of 18 shells or record a custom interior. Buy and sell with configurable refunds and a per-player limit, hand keys to other players, furnish the whole plot with up to 60 props, and lock real MLO doors. Property borders run on PolyZone, everything persists in MySQL.
Client exports
IsInsideHouse()Returns true while the player is inside a house.
GetCurrentHouse()The house the player is currently inside, or nil.
LeaveHouse()Puts the player back outside through the entrance.
GetHouseAtPoint(coords)The first house whose property border owns this ground.
GetHousesAtPoint(coords)Every house owning this ground, for overlapping plots such as an apartment block.
GetCurrentProperty()The plot the player is standing on right now, or nil.
IsOnProperty(houseId)Whether the player stands on the property of that house.
GetHouseZone(houseId)The stored border shape of a house.
GetAccent()The accent colour the player picked in Housing > Settings.
Server exports
GetHouses()Every house on the server, keyed by id.
GetPlayerHouses(source)The houses that player owns.
HasHouseAccess(source, houseId)Whether that player owns the house or holds a key to it.
GetHouseAtPoint(coords)The first house whose property border owns this ground.
GetHousesAtPoint(coords)Every house owning this ground, for overlapping plots.
GetHouseZone(houseId)The stored border shape of a house.
Events
agency-housing:client:enteredZoneFires with (houseId, house) when the player steps onto a property, so a job or robbery script does not have to poll.
agency-housing:client:leftZoneFires with (houseId, house) when the player leaves a property.
Still stuck after this page? Our support team takes it from here.