QBESXStandalone
Agency-Phone Exports & API
Now with AgencyOS27: a free update for everyone who already owns the phone.
v27.1.2Paid8 Pages

01Client Exports
| Export | Description |
|---|---|
IsPhoneOpen() | Returns true if the phone UI is currently open. |
IsPhonePoweredOn() | Returns true if the phone is powered on (false when player turned it off). |
GetPhoneData() | Returns the full client-side PhoneData table (open state, meta, etc.). |
GetPhonePropEntity() | Returns the entity handle of the held phone prop, or 0 if not visible. |
IsPhoneExpanded() | Alias of IsPhoneOpen() kept for backward compatibility. |
HasCarrierContract() | Returns true when the player has an active carrier data plan. |
GetPhoneState() | Returns table { isOpen, poweredOn, syncEnabled } summarising current phone status. |
HasPhone() | Returns true if the player has the configured phone item in their inventory. |
RegisterAgencyPayPoint(id, data) | Registers a runtime Agency Pay terminal at a coordinate (markers, blip, checkout payload). |
RemoveAgencyPayPoint(id) | Removes a previously registered Agency Pay terminal by id. |
StartAgencyPayCheckout(data) | Opens the phone (if needed) and launches an Agency Pay checkout flow with the given payment payload. |
StartCall(contactData) | Starts an outgoing phone call to the supplied contact ({ name, number, ... }). |
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. |
RegisterApp(config) | Puts an app from your own resource on the phone home screen and in the Store. Returns true, or false and an error. See Custom Apps. |
UnregisterApp(id) | Removes an app added with RegisterApp. Happens on its own when the resource that registered it stops. |
GetRegisteredApps() | Returns the table of all apps registered by other resources, keyed by id. |
ClosePhone() | Closes the phone, for example before your own interface opens. |
IsPhoneRadioActive() | Returns two values: true while the phone radio is playing, and the station that is playing. |
StopPhoneRadio() | Stops the phone radio. |
02Server Exports
| Export | Description |
|---|---|
SendMail(identifier, mailData) | Sends a mail to the player's primary mailbox by identifier (returns success). |
AddChirp(chirpData) | Inserts a Chirper post on behalf of the script ({ identifier, firstName, lastName, message, postId }). |
usePhone(event, item, inventory, slot, data) | ox_inventory hook registered when ESX+ox_inventory is detected; opens the phone for the inventory holder. |
VerifyAgencyPayCharge(source, requestId, minAmount) | Confirms on the server that this player paid the Agency Pay checkout with this id in the last 60 seconds, for at least minAmount, and uses the charge up so it counts only once. requestId is the id you passed to StartAgencyPayCheckout. Returns true and the amount, or false. Call it before handing out goods. |
03Events
| Name | Side | Description |
|---|---|---|
agency-phone:client:notify | Client | Shows a phone notification (title, text, icon, color, timeout, silent). |
agency-phone:client:usePhoneItem | Client | Triggers the phone open flow when the phone inventory item is used. |
agency-phone:client:openApp | Client | Asks the phone to navigate to a custom app by id (used by app modules). |
agency-phone:client:newMailNotify | Client | Notifies the client of a freshly received mail. |
agency-phone:server:requestPhoneData | Server | Requests a fresh phone data sync for the calling player. |
agency-phone:server:cancelCall | Server | Cancels or ends an active call. |
agency-phone:server:sendMessage | Server | Sends an SMS message (newMsg, targetNumber). |
agency-phone:server:saveSetting | Server | Persists a single phone setting key/value for the player. |
agency-phone:server:airdropPay | Server | Performs an Agency Airdrop pay-to-nearby-player transfer. |
agency-phone:server:buyDataPlan | Server | Buys a carrier data plan for the player (price, planName). |
agency-phone:dispatch:create | Server | Creates a phone dispatch from an emergency call/SMS. |