Agency Docs
QBESXStandalone

Agency-Phone 导出 & API

适用于FiveM的现代多框架手机:支持QBCore、ESX,也可完全独立运行。

v26.5付费7 页面

01Client Exports

导出说明
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.

02Server Exports

导出说明
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.

03事件

名称说明
agency-phone:client:notifyClientShows a phone notification (title, text, icon, color, timeout, silent).
agency-phone:client:usePhoneItemClientTriggers the phone open flow when the phone inventory item is used.
agency-phone:client:openAppClientAsks the phone to navigate to a custom app by id (used by app modules).
agency-phone:client:newMailNotifyClientNotifies the client of a freshly received mail.
agency-phone:server:requestPhoneDataServerRequests a fresh phone data sync for the calling player.
agency-phone:server:cancelCallServerCancels or ends an active call.
agency-phone:server:sendMessageServerSends an SMS message (newMsg, targetNumber).
agency-phone:server:saveSettingServerPersists a single phone setting key/value for the player.
agency-phone:server:airdropPayServerPerforms an Agency Airdrop pay-to-nearby-player transfer.
agency-phone:server:buyDataPlanServerBuys a carrier data plan for the player (price, planName).
agency-phone:dispatch:createServerCreates a phone dispatch from an emergency call/SMS.

看完本页仍未解决?接下来由我们的支持团队接手。