Agency Docs

شركاء التطوير

الربط مع سكربتات Agency

تبني سكربت FiveM خاصًا بك وتريد ربطه بسكربتاتنا؟ هنا كل تصدير وكل حدث عام، ومع كل واحد منها مقطع Lua جاهز للنسخ.

التصديرات تتيح لسكربتك استدعاء دالة داخل سكربتنا: exports['script-name']:FunctionName(args)، على العميل وعلى الخادم سواء. أما الأحداث فتعمل بالاتجاه المعاكس: تُطلق بـ TriggerEvent أو TriggerServerEvent، ويُستمع إليها بـ 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).

التوثيق الكامل

تصديرات العميل

IsPhoneOpen()

Returns true if the phone UI is currently open.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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)

تصديرات الخادم

SendMail(identifier, mailData)

Sends mail to a player (online or offline).

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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 } })

الأحداث

agency-phone:client:notify

Shows a phone notification (title, text, icon, color, timeout, silent).

اعرض المثال

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:usePhoneItem

Triggers the phone open flow when the phone inventory item is used.

اعرض المثال

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:openApp

Asks the phone to navigate to a custom app by id (used by app modules).

اعرض المثال

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:newMailNotify

Notifies the client of a freshly received mail.

اعرض المثال

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:requestPhoneData

Requests a fresh phone data sync for the calling player.

اعرض المثال

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:cancelCall

Cancels or ends an active call.

اعرض المثال

Hangs up an active call from a custom keybind or chat command.

RegisterCommand('hangup', function() TriggerServerEvent('agency-phone:server:cancelCall') end)
agency-phone:server:sendMessage

Sends an SMS message (newMsg, targetNumber).

اعرض المثال

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:saveSetting

Persists a single phone setting key/value for the player.

اعرض المثال

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:airdropPay

Performs an Agency Airdrop pay-to-nearby-player transfer.

اعرض المثال

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:buyDataPlan

Buys a carrier data plan for the player (price, planName).

اعرض المثال

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:create

Creates a phone dispatch from an emergency call/SMS.

اعرض المثال

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.

التوثيق الكامل

تصديرات العميل

IsPadOpen()

Returns true if the tablet UI is open (check tablet state before showing UIs).

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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).

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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, ... }).

اعرض المثال

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.

اعرض المثال

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)

تصديرات الخادم

SendMail(identifier, mailData)

Sends a mail to the player's primary mailbox by identifier (returns success).

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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 } })

الأحداث

agency-pad:client:notify

Shows a tablet notification (title, text, icon, color, timeout, silent).

اعرض المثال

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:usePadItem

Opens the tablet when the inventory item is used.

اعرض المثال

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:openApp

Trigger on the client to open a specific app inside the tablet.

اعرض المثال

Jumps the tablet straight to a custom fleet management app.

RegisterCommand('openfleet', function() TriggerEvent('agency-pad:client:openApp', 'fleet') end)
agency-pad:client:newMailNotify

Notifies the client of a freshly received mail.

اعرض المثال

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:hourlyPaycheck

Notifies the client of an hourly business paycheck event.

اعرض المثال

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:requestPadData

Requests a fresh tablet data sync for the calling player.

اعرض المثال

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:sendMessage

Sends an SMS message (newMsg, targetNumber).

اعرض المثال

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:airdropPay

Performs an Agency Airdrop pay-to-nearby-player transfer.

اعرض المثال

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:buyDataPlan

Buys a carrier data plan for the player.

اعرض المثال

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:create

Creates a tablet dispatch from an emergency call/SMS.

اعرض المثال

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:create

Creates a new business/organisation for the player.

اعرض المثال

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:adminCreate

Admin creates a business on behalf of another player.

اعرض المثال

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:startMission

Starts a configured business mission for the player.

اعرض المثال

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:applyToListing

Submits a job application to a business listing.

اعرض المثال

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:createMechanicInvoice

Creates a mechanic invoice draft.

اعرض المثال

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:sendMechanicInvoicePay

Sends a mechanic invoice to a customer for payment.

اعرض المثال

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:mdtCreateInvoice

MDT creates a fine/invoice for a citizen.

اعرض المثال

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.

التوثيق الكامل

تصديرات العميل

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.

تصديرات الخادم

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.

التوثيق الكامل

الأحداث

agency_lifeinvader:showAd

Shows an ad to the player (broadcast helper).

اعرض المثال

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:openMenu

Opens the "create ad" menu.

اعرض المثال

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:openRecentMenu

Opens the "recent ads" feed.

اعرض المثال

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:notify

Shows a framework notification on the player's screen (message, type).

اعرض المثال

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:submitAd

Submit a new ad from code (used by UI, can be re-used).

اعرض المثال

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.

التوثيق الكامل

الأحداث

blackmarket:client:openMenu

Opens the main black market menu.

اعرض المثال

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:closeMenu

Closes any open black market menus for the player.

اعرض المثال

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:openLaunderingMenu

Opens the money laundering submenu.

اعرض المثال

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:showNotification

Displays a styled black market notification (title, message, type, duration).

اعرض المثال

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:checkAccess

Checks the player's current access level.

اعرض المثال

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:completeBuy

Finalises a purchase after the client minigame succeeds.

اعرض المثال

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:sellItem

Processes an item sale.

اعرض المثال

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:completeSell

Finalises a sale after the client minigame succeeds.

اعرض المثال

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:launderMoney

Handles a money-laundering transaction.

اعرض المثال

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.

التوثيق الكامل

الأحداث

agency_minerJob:openSellMenu

Opens the sell menu at the ore refinery.

اعرض المثال

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:sellItems

Sells all ores at once at current market price.

اعرض المثال

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:requestPlayerItems

Returns the player's sellable mining items via receivePlayerItems.

اعرض المثال

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:requestPlayerSkill

Returns a quick mining skill summary via receiveSkillInfo.

اعرض المثال

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:requestDetailedStats

Returns the detailed mining stats payload via receiveDetailedStats.

اعرض المثال

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.

التوثيق الكامل

الأحداث

agencyrepairkit:client:startRepair

Starts the repair animation & progress bar on the target vehicle.

اعرض المثال

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:useRepairKit

ESX-specific alias that starts the repair-kit progress flow.

اعرض المثال

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:useRepairKit

QBCore-specific alias that starts the repair-kit progress flow.

اعرض المثال

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.

التوثيق الكامل

الأحداث

simple_carkeys:client:toggleLock

Toggles lock state of the vehicle (respecting ownership).

اعرض المثال

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:toggleEngine

Remote-starts or stops the targeted vehicle's engine.

اعرض المثال

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:showError

Shows a generic 'not your car' error notification on the client.

اعرض المثال

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:showNotificationText

Shows a success notification with arbitrary text on the client.

اعرض المثال

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:showErrorText

Shows an error notification with arbitrary text on the client.

اعرض المثال

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:forceToggleLock

Job/admin path: broadcasts a lock toggle for a vehicle without ownership checks.

اعرض المثال

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:forceToggleEngine

Job/admin path: broadcasts an engine toggle for a vehicle without ownership checks.

اعرض المثال

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:checkOwnershipAndLock

Validates ownership/shared keys for the plate then broadcasts a lock toggle on success.

اعرض المثال

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:checkOwnershipAndStart

Validates ownership/shared keys for the plate then broadcasts an engine toggle on success.

اعرض المثال

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:universalEngineStart

Allows any player to start any engine when Config.AllowUniversalEngineStart is enabled.

اعرض المثال

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.

التوثيق الكامل

الأحداث

agency-vending:notify

Generic server-driven notification dispatcher for the vending resource.

اعرض المثال

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:startAgencyPay

Initiates an Agency Pay checkout via the agency-phone integration with merchant metadata.

اعرض المثال

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:buyMachineResult

Result of a buy-machine purchase, forwarded to the NUI for feedback.

اعرض المثال

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:machineCreated

Broadcast that a new player-owned machine was created; updates local cache and notifies owner.

اعرض المثال

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:openManagementVerified

Server-verified open of the owner management menu with items, earnings and label.

اعرض المثال

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:openOwnedList

Opens the owner overview NUI listing all of the player's machines with street names.

اعرض المثال

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:spawnMachineCreated

Admin-spawner broadcast that a new spawned machine entity was created.

اعرض المثال

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:spawnMachineDeleted

Admin-spawner broadcast that a spawned machine entity was deleted.

اعرض المثال

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:openSpawnerUI

Opens the admin spawner NUI after server-side permission check passes.

اعرض المثال

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:buyMachine

Player buys a vending machine of a given type at the supplied coords/heading.

اعرض المثال

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:requestOwnedList

Caller requests the list of their owned machines for the owner overview UI.

اعرض المثال

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:requestMachines

Caller requests a full sync of all player-owned machines from the server.

اعرض المثال

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:requestManagement

Server-verified open of the management UI for an owned machine.

اعرض المثال

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:requestSpawnedMachines

Caller requests the list of admin-spawned machines for the spawner UI.

اعرض المثال

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:adminSpawnMachine

Admin places a new vending machine prop server-side after permission check.

اعرض المثال

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:adminDeleteSpawned

Admin deletes a previously spawned vending machine prop server-side.

اعرض المثال

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.

التوثيق الكامل

الأحداث

agency-admin:client:refreshStaffRanks

Triggers the client to re-pull staff ranks data.

اعرض المثال

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)) end
agency-admin:client:freezeTime

Freezes / unfreezes the world time on the client at the given hour/minute.

اعرض المثال

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:dashboardValue

Pushes a single dashboard card value (e.g. live counter) to the panel UI.

اعرض المثال

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:teleportToCoords

Teleports the caller to the supplied world coordinates.

اعرض المثال

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:announce

Shows a server-wide announcement banner.

اعرض المثال

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:notify

Pushes a notification to a specific admin.

اعرض المثال

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:freeze

Freezes the target player in place.

اعرض المثال

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:heal

Restores target's HP/armor.

اعرض المثال

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:revive

Revives the target player.

اعرض المثال

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:teleport

Teleports the local player to the supplied coords vector.

اعرض المثال

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:openMenu

Opens the admin panel UI (requires ACE permission).

اعرض المثال

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:openToolsMenu

Server-driven trigger to open the admin tools sub-menu.

اعرض المثال

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:closeMenu

Server-driven trigger to close the admin panel UI.

اعرض المثال

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:openClothingMenu

Server-driven trigger to open the in-game clothing menu for the player.

اعرض المثال

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:requestPlayers

Requests the current online players list for the admin panel.

اعرض المثال

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:requestPanelPermissions

Requests the panel permission table for the rank editor.

اعرض المثال

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:requestStaffRanks

Requests the staff ranks dataset for the panel.

اعرض المثال

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:createRank

Creates a new staff rank with metadata and permissions.

اعرض المثال

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:requestMyPermissions

Caller requests their own resolved panel permission set.

اعرض المثال

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:requestSync

Caller asks the server to push the standard sync payload (duty/perms/etc.).

اعرض المثال

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:requestDutyRank

Caller requests their current admin-duty rank info.

اعرض المثال

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:requestSpawnedObjects

Caller requests the list of admin-spawned world objects.

اعرض المثال

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.

التوثيق الكامل

الأحداث

agency-reports:client:notify

Fires a "new report" notification to a specific admin.

اعرض المثال

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:openPlayerUI

Opens the player-side report UI.

اعرض المثال

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:openAdminUI

Opens the admin-side report list.

اعرض المثال

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:teleport

Teleports the calling admin to the supplied coordinates (for goto actions).

اعرض المثال

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:healSelf

Fully heals the calling admin's ped.

اعرض المثال

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:submitReport

Submits a new report from outside the UI.

اعرض المثال

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:requestPlayerData

Caller requests their own report payload; optionally opens the player UI on response.

اعرض المثال

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:requestAdminData

Admin requests the full reports dataset and opens the admin dashboard if permitted.

اعرض المثال

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:sendChatMessage

Sends a chat message to an open report.

اعرض المثال

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.

التوثيق الكامل

تصديرات العميل

GetVehicleSettings()

Returns the current vehicle settings table.

اعرض المثال

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'.

اعرض المثال

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).

اعرض المثال

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).

اعرض المثال

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).

اعرض المثال

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.

اعرض المثال

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).

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

Reads the detected framework key for branching custom HUD logic.

local fw = exports['Agency-Hud']:GetDetectedFramework() if fw == 'qb' then print('QB-Core detected') end

الأحداث

Agency-HUD:client:applyVehicleSettingsPatch

Applies a partial vehicle-settings patch to local vehicle HUD.

اعرض المثال

Applies a partial vehicle HUD settings patch on the local client.

TriggerEvent('Agency-HUD:client:applyVehicleSettingsPatch', { style = 'modern', speedUnit = 'kmh' })
Agency-HUD:client:openAdminMenu

Opens the HUD admin menu (requires permission).

اعرض المثال

Opens the admin HUD menu NUI on the receiving client.

TriggerEvent('Agency-HUD:client:openAdminMenu')
Agency-HUD:server:checkAdminPermission

Verifies caller's admin rights and opens the admin menu on success.

اعرض المثال

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:saveGlobalSettings

Admin-only persistence of global HUD settings; broadcasts sync.

اعرض المثال

Saves a new global HUD configuration (admin only) and broadcasts it.

TriggerServerEvent('Agency-HUD:server:saveGlobalSettings', { style = 'modern', accent = '#ff6b00' })
Agency-HUD:server:requestGlobalSettings

Returns current global settings to the requesting client.

اعرض المثال

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:requestTime

Returns current server time to the caller for the HUD clock.

اعرض المثال

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.

التوثيق الكامل

تصديرات العميل

StartProgress(data: table)

Starts a progress bar with a full options table. Returns immediately; callbacks fire on completion/cancel.

اعرض المثال

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.

اعرض المثال

Cancels the active progress bar when the player presses X.

if IsControlJustPressed(0, 73) then exports['Agency-Progressbar']:StopProgress(false) end
IsProgressActive()

Returns true if a progress bar is currently shown.

اعرض المثال

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).

اعرض المثال

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'.

اعرض المثال

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'.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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)

تصديرات الخادم

StartProgressForPlayer(playerId: number, data: table)

Trigger a progress bar on a specific client from the server.

اعرض المثال

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.

اعرض المثال

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.

اعرض المثال

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).

اعرض المثال

Stops the global storm warning progress bar on every player.

RegisterNetEvent('event:weatherCleared', function() exports['Agency-Progressbar']:StopProgressForAllPlayers(true) end)

الأحداث

Agency:Progressbar:LoadSettings

Loads per-player UI settings (position, color, scale, style) from DB into the client.

اعرض المثال

Loads the player's saved progress bar UI settings on spawn.

AddEventHandler('playerSpawned', function() TriggerEvent('Agency:Progressbar:LoadSettings') end)
agency-progressbar:client:start

Starts the progress bar on the receiving client with the supplied data.

اعرض المثال

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:stop

Stops the active progress bar with a completion flag.

اعرض المثال

Aborts the active progress bar when the player gets cuffed.

RegisterNetEvent('police:cuffed', function() TriggerEvent('agency-progressbar:client:stop', false) end)
agency:consumables:useFood

Inventory bridge to consume a food item (animation + secured server apply).

اعرض المثال

Triggers the inventory food bridge to consume a sandwich item.

TriggerEvent('agency:consumables:useFood', 'sandwich')
agency:consumables:useDrink

Inventory bridge to consume a drink item (animation + secured server apply).

اعرض المثال

Triggers the inventory drink bridge to consume a coffee cup item.

TriggerEvent('agency:consumables:useDrink', 'coffee_cup')
Agency:Progressbar:SaveSettings

Validates and persists the player's progress bar UI settings to the DB.

اعرض المثال

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:start

Server-side trigger to start a progress bar on a target (or self).

اعرض المثال

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:stop

Server-side trigger to stop a progress bar on a target (or self).

اعرض المثال

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:request

Validates ammo/weapon/item before granting a reload to the requesting player.

اعرض المثال

Asks the server to validate ammo and grant a pistol reload.

TriggerServerEvent('agency:reload:request', 'WEAPON_PISTOL', 'ammo-9')
agency:consumables:apply

Validates inventory, removes one item and applies hunger/thirst gains.

اعرض المثال

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.

التوثيق الكامل

تصديرات العميل

Notify(data: { title, text, type, duration, ... })

Shows a notification. Accepts { type, title, text, duration, icon, color }.

اعرض المثال

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 })

الأحداث

Agency:Notify:Send

Same as the export, lets you use the legacy Trigger-based pattern.

اعرض المثال

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:LoadSettings

Applies per-player saved UI settings (position, color, scale, style) from the server.

اعرض المثال

Loads saved per-player notify UI settings on spawn.

AddEventHandler('playerSpawned', function() TriggerEvent('Agency:Notify:LoadSettings') end)
Agency:Notify:SaveSettings

Validates and persists the player's notify settings (position, accent, scale, style).

اعرض المثال

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.

التوثيق الكامل

تصديرات العميل

enableSeatbelt()

Forces the seatbelt on (use e.g. on police arrest).

اعرض المثال

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).

اعرض المثال

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).

اعرض المثال

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.

اعرض المثال

Disables the exit-vehicle control while the seatbelt is buckled.

if exports['Agency-Seatbelt']:isSeatbeltOn() then DisableControlAction(0, 75, true) end

16Agency-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.

التوثيق الكامل

الأحداث

Agency-Elevator:server:requestTravel

Server-validated request to travel between floors.

اعرض المثال

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:travelComplete

Acknowledges client arrival and pushes the 'arrived at floor' notification.

اعرض المثال

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:requestElevators

Syncs the loaded elevator list from the database to the requesting client.

اعرض المثال

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:saveElevator

Permission-gated upsert of an elevator (id/label/floors) into MySQL.

اعرض المثال

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:loadElevator

Spawns/loads a saved elevator from the database.

اعرض المثال

Loads a single elevator's data into the configurator NUI for editing.

TriggerServerEvent('Agency-Elevator:server:loadElevator', 'lspd-tower-1')
Agency-Elevator:server:saveSettings

Persists UI settings (position/scale/accent color) to MySQL and re-syncs all clients.

اعرض المثال

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:startTravel

Starts an elevator travel cutscene for the player.

اعرض المثال

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:applySettings

Pushes UI settings (accent/scale/position) into the NUI.

اعرض المثال

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:openConfigurator

Opens the in-game elevator configurator (admin only).

اعرض المثال

Opens the admin configurator NUI with the current elevator list.

TriggerEvent('Agency-Elevator:client:openConfigurator')
Agency-Elevator:client:refreshConfigurator

Refreshes the open configurator after a save/delete without closing it.

اعرض المثال

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.

التوثيق الكامل

تصديرات العميل

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.

تصديرات الخادم

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.

الأحداث

agency-housing:client:enteredZone

Fires with (houseId, house) when the player steps onto a property, so a job or robbery script does not have to poll.

agency-housing:client:leftZone

Fires with (houseId, house) when the player leaves a property.

ما زلت عالقًا بعد هذه الصفحة؟ فريق الدعم يتولّى الأمر من هنا.

ما زلت عالقًا بعد هذه الصفحة؟ فريق الدعم يتولّى الأمر من هنا.