Pulse Phone docs

Integrations: the scripts Pulse Phone works with

Pulse Phone connects to the scripts your server already runs. Drop it in, start it after your framework and scripts, and it finds them on its own. There is nothing to set for a normal server.

For Pulse Phone 1.5.225 min readUpdated

This page lists every script the phone supports in each category, what "auto" picks when several are running, how to force one, and how to connect a script that isn't listed.

  • The startup line. When the phone starts it prints one line naming what it connected to: Phone Framework: QBCore | Database: oxmysql | Voice: pma-voice | Housing: qb-houses | Garage: qb-garages | Banking: framework | Company accounts: Renewed-Banking | Inventory: ox_inventory | Vehicle keys: qbx_vehiclekeys | Fuel: ox_fuel | Dispatch: ps-dispatch ...
  • phone:diag (server console) lists every candidate for every category, which one is in use, and why each of the others was skipped.
  • A script it knows but can't use. If a supported script is running but isn't a version the phone recognises (a renamed or missing export), you get one yellow line naming the script and what is missing. The phone then uses the next option instead.
  • Restarts. A script that starts or restarts after the phone is picked up within about two seconds.

Choosing or forcing a script

Every category has an entry in Config.Providers in config/config.lua:

Lua
Config.Providers = {
    garage   = 'auto',             -- pick the best one that is running (the default)
    keys     = 'wasabi_carlock',   -- always use this one (the resource name from server.cfg)
    dispatch = 'none',             -- switch the category off
    ...
}
  • 'auto' picks the highest-ranked supported script that is running. Each table below lists scripts from highest to lowest rank.
  • Two scripts of the same rank. If both are running, the one whose name comes first alphabetically is used and phone:diag shows the category as CONFLICT, naming both. Set the one you use in Config.Providers to settle it.
  • A resource name always uses that script. If it isn't running, phone:diag says so and the category has no provider until it starts.
  • 'none' switches the category off.

phone:diag shows one state per category:

State Meaning
READY a script is connected and answered its checks
CONFLICT connected by rank, but another script of the same rank is running too: pin one
DEGRADED a lower-ranked script (or the phone's own fallback) answers because a better-ranked one is not usable
NOT_READY nothing connected yet: the script is still starting, the framework is not ready, or the pinned script is not running
UNSUPPORTED_VERSION the script runs but lacks a function the phone calls: update it, keep its folder name exactly as shipped, and check its config does not switch its exports off
DISABLED_BY_OWNER Config.Providers.<category> = 'none'
ABSENT nothing installed for an optional category

A script that registers its exports a few seconds after it starts (several banking scripts wait for their database first) is shown as NOT_READY and checked again on its own for about 90 seconds; it is only reported as an unsupported version if the function is still missing after that. Developers can read the same states with exports.phone:GetIntegrationReadiness().

Most categories are optional. A server without a housing script simply has no homes in the Home app.

Framework

Script Notes
ESX Legacy (es_extended)
QBCore (qb-core)
Qbox (qbx_core) Qbox also runs a qb-core bridge. The phone treats the two as one framework.
ox_core
vRP 2 (vrp)
Standalone Used when no framework is running. The phone keeps its own bank ledger, jobs and test garage.
Anything else Use Config.Framework = 'custom' with a bridge table shaped like optional-developer-kit/custom_framework_bridge.lua.

Config.Framework in config/config.lua, or setr phone_framework <name> in server.cfg, forces one. You must set one of them when more than one framework resource is started. The phone refuses to guess, and says so in red.

Banking

Your own balance (Wallet, paying in Messages, bills, valet fees) is your framework's bank money. Every banking script below reads and writes that same money, so the phone and your bank always show the same number.

What a banking script adds:

Script Company accounts (Services) Bank history in Wallet Shared accounts in Wallet
wasabi_banking yes not public no
tgiann-bank yes (job accounts) yes no
Renewed-Banking yes yes yes
tgg-banking yes not public no
gks-banking yes, for each job named in Config.Providers.gksBankingAccounts = { police = 'IBAN or account id' } (it publishes no way to find a job's account) not public no
qs-banking yes not public no
okokBanking yes yes (V2) no
fd_banking yes not public no
snipe-banking yes not public no
qb-banking yes yes yes
esx_banking ESX company money is esx_addonaccount's yes no
qb-management (copies from before late 2023 that still hold money) yes no no
ps-banking (archived) no company accounts yes no
esx_addonaccount / esx_society yes (society_<job>) no no
  • Rank for company accounts: wasabi_banking, then tgiann-bank, then the scripts ranked 30 (Renewed-Banking, okokBanking, qs-banking, fd_banking, snipe-banking, tgg-banking), then qb-banking, qb-management, esx_addonaccount.
  • Why wasabi_banking ranks first: it can answer calls meant for Renewed-Banking, qb-management and okokBanking. When it runs, its own exports are the ones the phone uses.
  • Money safety:
  • A company account never goes below zero from the phone.
  • A move the banking script accepted, but whose balance never showed the change, is recorded as unconfirmed for staff to check. It is never refunded or retried automatically, because that could pay twice.
  • Settings: Config.Providers.society (company accounts), .statement (history) and .accounts (shared accounts).

"Not public" means the script publishes no way for another script to read its history. The Wallet then shows only the phone's own transfers.

Society, boss menus and job management

The phone's company features (Services > company account, deposits and withdrawals by the boss) use the job from your framework and the company account from the banking table above.

Script What happens
qbx_management Holds no money. The company account comes from your banking script (usually Renewed-Banking).
qb-management Current versions hold no money (qb-banking does). Older copies are supported directly.
esx_society The account name comes from GetSociety. The money lives in esx_addonaccount.
okokBossMenu Keeps money in the system its Config.SocietySystem names (addon-account, okokBanking, qb-banking or qb-management). Each of those is supported above.

Multijob (several jobs, one active)

Services lists every company whose job a character holds, and switches the active one. One multijob script is used (Config.Providers.multijob, rank highest first):

Rank Script How
50 wasabi_multijob GetPlayerJobs, SetActiveJob; on-duty and off-duty go through its SetPlayerDuty
40 Qbox its own held jobs (PlayerData.jobs) and SetPlayerPrimaryJob
30 ps-multijob its multijobs table; the switch is its own event, sent from the player's client

Without one, Services shows only the active job.

Vehicle keys

When the valet brings a car (Garage > valet), the player gets its keys through your key script. Setting: Config.Providers.keys.

Script Rank How the phone gives keys
qbx_vehiclekeys 25 server GiveKeys(source, vehicle)
Renewed-Vehiclekeys 20 server addKey(source, plate)
wasabi_carlock 20 server GiveKey(source, plate)
MrNewbVehicleKeys 20 server GiveKeys(source, netId)
vehicles_keys (jaksam) 20 server giveVehicleKeysToPlayerId(source, plate, 'owned')
ak47_vehiclekeys / ak47_qb_vehiclekeys 20 server GiveKey(source, plate, false)
qb-vehiclekeys 20 server GiveKeys(source, plate); before 1.3, its vehiclekeys:client:SetOwner event
qs-vehiclekeys 20 client GiveKeys(plate, model, false), on the player's own client
cd_garage (its built-in keys) 15 cd_garage:AddKeys to the player
okokGarage (its built-in keys) 15 the player's client raises okokGarage:GiveKeys
t1ger_keys 20 server UpdateKeysToDatabase(plate, true): the keys are recorded on the owned car, which is the one the valet brings
0r-vehiclekeys 20 server GiveKeys(source, plate), checked before and after with HasKeys(source, plate) so a second delivery does not add a second key
VehicleKeyChain 20 server AddKey(source, plate, 1), only when IsVehicleOwner and IsKeyOwner both say the player has no key yet
brutal_keys 20 the server event brutal_keys:server:addVehicleKey (source, plate, plate as the label). An event gives no answer, so the phone cannot confirm the key arrived
No key script 0 Nothing to hand over. The car is driveable as it is.
  • qbx_vehiclekeys and the qb-vehiclekeys name: qbx_vehiclekeys also answers to the name qb-vehiclekeys. The phone uses qbx's own export, so both are never called.
  • A dedicated key script wins over a garage script's own keys, for example wasabi_carlock over cd_garage.

Remote lock and unlock (Garage app)

Setting: Config.Providers.vehiclelock.

Script How
qbx_vehiclekeys SetLockState(vehicle, 'lock' \| 'unlock'). Vehicles it marks as having no lock are refused.
Renewed-Vehiclekeys its vehicleLock state bag
MrNewbVehicleKeys SetVehicleLock(netId, 1 \| 2)
t1ger_keys The game's own door lock, plus its client SetVehicleLocked(vehicle, 2 \| 1) on the owner's client (t1ger keeps its lock in a decor) when the car is near them
qb-vehiclekeys, wasabi_carlock, cd_garage, vehicles_keys, okokGarage, qs-vehiclekeys, ak47 keys, VehicleKeyChain The game's own door lock, which is what their key fobs toggle. None of them publishes a server call to set a lock (cd_garage's and qs-vehiclekeys' lock calls are client-side).
No key script, or a key script not listed here (0r-vehiclekeys, brutal_keys) The game's own door lock

Fuel (valet delivery)

A car the valet brings arrives with the fuel level the garage stored, not a full tank or a random one. Setting: Config.Providers.fuel.

Script How
ox_fuel the vehicle's fuel state bag, which ox_fuel reads when a driver gets in
Renewed-Fuel its server SetFuel(vehicle, level) export, and the fuel state bag it reads
lc_fuel its client SetFuel(vehicle, level)
qs-fuelstations its client SetFuel(vehicle, level)
cdn-fuel its client SetFuel(vehicle, level)
ps-fuel its client SetFuel(vehicle, level)
BigDaddy-Fuel its client SetFuel(vehicle, level)
okokGasStation its SetFuel(vehicle, level)
x-fuel its SetFuel(vehicle, level)
rcore_fuel its SetFuel(vehicleEntity, level) (the HUD and garage pair); its docs give no unit, the phone passes 0-100
LegacyFuel its client SetFuel(vehicle, level). Without it, LegacyFuel gives a car a random tank.
No fuel script the state bag and the game's own fuel level
  • Order: the list above is the order of preference.
  • Scripts that register themselves as LegacyFuel (lc_fuel does) are asked by their own name.
  • How the client copy works: for the scripts with a client call, the player's own client copies the level into the script. It only does this when the script shows a different level, so it never fights a script that manages the state bag itself.

Garages (Garage app and valet)

The Garage app lists the character's vehicles, where each one is (parked at which garage, out in the world, impounded at which lot and for how much), and offers lock/unlock and valet. Setting: Config.Providers.garage.

Everything below is read from the garage script. The only writes are the valet's (the framework table's stored / state flag, the car it creates, the bank fee and the keys) and the lock state of a car that is already out. The phone never takes a car out of a garage script's own storage, never releases a car from an impound and never pays an impound fee; the fee is shown only.

Script Rank Parked / impounded Garage places Valet
codem-garagesv2 (CodeM Supreme) 30 its own register: GetPlayerVehicles, state 0 out / 1 garaged / 2 impounded, GetImpoundData for fee, reason, lot and time left GetGarage / GetImpound off
jg-advancedgarages 30 its in_garage, garage_id, impound and impound_data columns getAllGarages or its config off
cd_garage 30 its in_garage, garage_id and impound columns (from its former SQL page; the current docs no longer list them), plus GetVehicleImpoundData GetGarageLocations off
okokGarage 30 its parking and impoundTime columns (on QBCore, the garage column when parking is empty); the retrieve fee only when Config.RetrieveFeeEnabled is on its config.lua on
vms_garagesv2 30 its garage, impound_date and impound_data columns (impounded when both impound columns are set) getGarageInfo off
qs-advancedgarages 30 its garage column ('OUT' means out) and player_garages.isImpound player_garages off
qbx_garages 21 state, garage and depotprice GetGarages on
qb-garages 20 state, garage and depotprice getAllGarages or its config on
esx_garage 20 stored, parking and pound getGarages / getImpounds or its config on
esx_advancedgarage 20 stored (older and v1.0.0 configs, including its job pounds) its config on
codem-garage 15 the framework's list, plus the garage name from its parking column (Impound Garage means impounded) not public off
rcore_garage 15 the framework's list only (its storage is not public) not public off
loaf_garage 15 the framework's list only (its storage is not public) not public off
no garage script 5 the framework's own vehicle table Config.Garage.garages on
  • Why valet is off for some scripts: those scripts record "parked" in a column of their own that the valet can't update. A delivered car would still show as parked in that script's menu, which would let the player take out a second copy. So the valet is switched off for them. The rest of the Garage app works as normal.
  • Garages whose places aren't public: list them yourself in Config.Garage.garages, and the app can point players to them.

Housing (Home app)

Setting: Config.Providers.housing. Each script supports only what it publishes:

Script List homes Lock / unlock Key holders Give / take keys
qb-houses (+ qb-apartments) yes yes yes yes
ps-housing yes no (shells have no lock state) yes yes
qbx_properties yes no yes no
qs-housing yes not public no no
bcs_housing yes yes yes take only
nolag_properties yes yes yes yes
vms_housing yes no yes yes
rtx_housing yes yes (its server SetPropertyLockStatus, after its own unlocking permission check) yes yes (through the events its own menu raises; not in its public docs)
loaf_housing yes yes (with loaf_keysystem) yes yes
esx_property yes no (its own menu only) yes no
qb-apartments on its own yes no no no
  • Ranking: every housing script ranks 6. qb-apartments ranks 5, so on its own it is used only when no other housing script runs.
  • qb-houses with qb-apartments: the apartment appears beside the houses. House actions are never sent for the apartment.

Inventory

Used for the phone item, the power bank and add-on apps. Setting: Config.Providers.inventory.

Script Rank
qs-inventory, codem-inventory, core_inventory, tgiann-inventory, origen_inventory, ak47_inventory, jaksam_inventory 25
ox_inventory 20
qb-inventory (old and new), ps-inventory, lj-inventory, the ESX inventory, vRP 10 (through the framework's own item functions)

Scripts that register themselves under another inventory's name (tgiann-inventory and origen_inventory can register as qb-inventory or ox_inventory) rank above that name, so the right one is asked.

Dispatch (Smart 911, Services)

Setting: Config.Providers.dispatch.

Script How
ps-dispatch 3.x SendTargetedAlert to the on-duty responders
ps-dispatch 2.x its ps-dispatch:server:notify event. Its clients filter by job and duty.
cd_dispatch cd_dispatch:AddNotification
cd_dispatch3d AddNotification
core_dispatch sendAlert (addCall on copies without it)
codem-dispatch v2 SendDispatchAlert (older copies without it: its sendAlert event)
qs-dispatch qs-dispatch:server:CreateDispatchCall
qs-police-creator CreateDispatchCall (answers success or a message, which the phone reports)
rcore_dispatch rcore_dispatch:server:sendAlert
tk_dispatch addCall
0r-dispatch SendAlert
linden_outlawalert wf-alerts:svNotify
wasabi_mdt, kartik-mdt, origen_police, lb-tablet (MDTs, used when no dispatch script runs) CreateDispatch, CreateCall, SendAlert, AddDispatch
No dispatch script a phone notification to every online player with the job

ps-dispatch 1.x (dispatch:server:notify) is not supported. The tablet's Calls board reads these scripts too: see The Calls board below.

Billing and invoices (Wallet > Bills)

Bills from these scripts show up in Wallet > Bills and can be paid there. Paying a bill settles it in the billing script's own records.

Script How
The phone's own bills the SendBill export (optional-developer-kit/EXPORTS.md)
esx_billing its billing table
okokBilling its okokbilling table (unpaid / paid)
QBCore phone_invoices the table QBCore's phone schema uses (with its reason, shown as the bill's reason)

A bill with nobody to receive the money is refused before anything is taken, unless you turn on Config.Bills.payToCity.

Pulse Tablet: police and EMS scripts

The police MDT, the ticket book, the EMS patient chart and the Calls board work on their own. When your server already runs a police, EMS, billing, jail or MDT script, the tablet works through it instead of beside it: each job has exactly one owner, and Pulse never fires another script's protected server events or writes another script's tables.

Who does what: Config.Tablet.integrations

config/apps.lua:

Lua
integrations = {
    fines      = 'auto',  -- who bills a printed ticket: 'auto', a script below, 'pulse', 'record' or 'none'
    medicalFee = 'auto',  -- who bills the EMS report fee (same choices)
    jail       = 'none',  -- who jails the jail time on a ticket: 'none' (record only), 'auto' or a script
    dispatch   = 'auto',  -- whose calls the Calls board reads (and where 911 alerts go)
    records    = 'auto',  -- where person and plate lookups read from
    mdt        = 'auto',  -- another MDT whose warrants, BOLOs and felony flag the tablet shows (read only)
    medical    = 'auto',  -- which ambulance script the body scan reads
    offDutyJobs = { offpolice = 'police', offsheriff = 'sheriff', offambulance = 'ambulance' },
    -- nfsBillingAccount = 'police',
},
  • 'auto' uses the highest-ranked script below that is running.
  • A resource name pins that script. It overrides Config.Providers for the same category.
  • fines = 'record' writes the ticket into the tablet only. Nobody is billed. Use it when your police script bills its own fines.
  • 'none' switches the job off. 'pulse' is accepted as another word for it on the read categories.
  • Off-duty jobs. Some scripts swap an officer to an off-duty job. With such a job the tablet says "go on duty" instead of "not your department".

At start the server prints one line per job naming its owner. It prints a red CONFLICT line when two scripts would both bill the same fine, for example loaf_billing replacing esx_billing while esx_billing also runs. The tablet still bills once.

What every answer means

Every billing and jail script answers in the same three words. The tablet stores the answer on the ticket.

Answer Meaning What the tablet does
done The script accepted it Shows BILLED or JAILED with the script's name
refused The script said no, or the target was gone Tries the next script, then Pulse's own invoice
unknown It threw, timed out or answered nothing readable Shows CHECK. It never retries, so nothing is billed twice.
  • Pinned before the call. The chosen script is written to the ticket (bill_via, jail_via) before it is asked. A crash in the middle can then never move the ticket to a second script.
  • Unanswered tickets. phone:tablet bills in the server console lists every ticket still CHECK or unknown-jail, for staff to settle by hand.
  • Company money. Pulse never credits the society itself when a billing script took the bill. The script pays its own society when the bill is paid.

Billing (printed tickets, the EMS report fee)

Rank Script How
60 wasabi_police v2 FinePlayer(target, amount, reason). Fines only, and only when wasabi is your police job.
50 wasabi_billing CreateInvoice
45 okokBilling V3 CreateInvoice
40 okokBilling V2 okokBilling:CreateCustomInvoice, sent from the officer's own client as its docs show
35 esx_billing BillPlayer(target, officer, 'society_<job>', label, amount)
32 tgg-billing CreateInvoice (the company as sender, straight to unpaid, no extra tax)
30 codem-billing v1 createBilling
28 billing_ui createBill
27 brutal_billing its brutal_billing:server:CreateInvoice event (it answers nothing, so the tablet says sent, not paid)
26 nfs-billing sendInvoice. It keeps its own vault, so set integrations.nfsBillingAccount.
24 loaf_billing CreateBill (answers by callback, 5 s limit)
22 gksphone NewBilling(target, reason, society, label, officer's character id, amount)
20 jim-payments qb-phone's phone_invoices, and only while qb-phone itself runs. Without qb-phone it steps aside.
– Pulse Wallet > Bills, else a direct bank charge with a statement line
  • Shims. A script that only answers for another one never wins over the real one:
  • okokBilling, esx_billing and codem-billing calls answered by wasabi_billing go to wasabi_billing's own exports;
  • okokBanking answered by wasabi_banking goes to wasabi_banking;
  • qb-management answered by wasabi_banking or Renewed-Banking goes to that script.
  • Not called at all: qb-policejob and qbx_police. They bill and jail only from an officer's own client.

Jail (jail time on a ticket)

Jail runs only when integrations.jail is 'auto' or names one of these. Each takes the sentence in its own unit, and the ticket's minutes are converted.

Rank Script How
50 wasabi_police v2 JailPlayer(id, seconds, reason)
45 rcore_prison Jail(id, minutes, reason, officer)
40 qbx_prison JailPlayer(id, minutes)
38 xt-prison SetJailTime(id, minutes), then its own entry event to the citizen. xt-prison's deprecated compatibility event prints a warning in the citizen's F8. Pulse does not load ox_lib, so its ox_lib callback cannot be used.
30 qb-prison the injail metadata plus qb-policejob's own client entry event
20 esx_jail its esx_jail:sendToJail handler, in seconds
15 pickle_prisons sent from the officer's own client, prison 'default'

The ticket keeps a jail_state: none, then jailing, then done, refused or unknown. A reprint never jails twice.

Medical (the EMS body scan, and Give)

Rank Script What is read Per-part cause Give can revive / heal
40 qbx_medical qbx_medical:injuries:<PART>, bleedLevel, deathState state bags yes (weapon on each part) Revive, Heal exports
38 osp_ambulance BodyDamage.BodyPartDamage (Wounds, Fractures, Bleeding per part) no revive only
35 ars_ambulancejob injuries (with its cause) and dead state bags yes yes
30 wasabi_ambulance v2: getPlayerInjuryTotals and wasabi:deathState; v1: dead no yes
28 esx_death its death state no Revive, heal
25 qb-ambulancejob the limbs its own client syncs; death from metadata no yes
20 esx_ambulancejob the isDead state bag. Before 1.14 it reads users.is_dead from the database just before the scan. no heal only
  • No ambulance script. The tablet places the injury on the bone the scanning client last saw hit, sizes it by the health the server saw lost, and says so on screen.
  • Give never revives by default. Tapping a treatment logs it with the time. To have CPR or a defibrillator ask the ambulance script for a revive (and bandages or sutures for a heal), set Config.Tablet.ems.applyTreatments = true. ems.apply maps each treatment to revive or heal. Each result is written next to the treatment in the log.

Records (person and plate lookup)

Rank Source What
25 qbx_vehicles GetVehicleIdByPlate, GetPlayerVehicle, GetPlayerVehicles({ citizenid }). People come from the Qbox players table.
10 framework tables QBCore and Qbox players and player_vehicles; ESX users and owned_vehicles. Licences come from QB metadata licences or ESX user_licenses.
10 ox_core characters, vehicles (plates padded to 8 characters), character_licenses with ox_licenses labels

Online players are always found through the framework as well. Plates match as typed, trimmed, padded or centred.

Other MDTs (read only)

Rank Script What the tablet shows
40 wasabi_mdt GetActiveWarrants on the person file and the warrants board
35 kartik-mdt GetWarrants and HasActiveWarrant
30 ps-mdt 3.x IsCidFelon, warrants and BOLOs from its tables (a vehicle BOLO's plate is its subject_id)
25 ps-mdt 2.x IsCidFelon, mdt_convictions warrants, mdt_bolos

Each read is limited to 1.5 seconds, so a slow MDT never holds up the tablet. Nothing is ever written into another MDT.

The Calls board

The board shows the open calls of the dispatch script in use. You can attach to a call, detach from it, or close it, only where that script has a server API for it:

Script List Attach / detach Close Live updates
ps-dispatch 3.x GetDispatchCalls yes, from the officer's own client yes (clearCall, checked against the call's jobs) polled every 4 s while open
ps-dispatch 2.x GetDispatchCalls yes no polled
codem-dispatch v2 GetActiveCalls RespondToCall / DetachFromCall CloseCall polled
cd_dispatch3d GetAllDispatchNotifications no no cd_dispatch:PlayerResponding
wasabi_mdt GetActiveDispatches no no polled
kartik-mdt heard: its kartik-mdt:dispatchCreated event no no on each new call
Every other dispatch script, and none heard: the alerts the phone itself sent or saw no no on each new call
  • Confirmed actions only. An attach or close counts as done only once the dispatch script's own list shows it. Otherwise the board says it could not confirm.
  • Polling. The board polls only while someone has it open.

Provider shapes for your own scripts

Register one with exports.phone:RegisterProvider(category, name, impl, rank), as shown under Connecting a script that isn't listed. Callbacks are always called exactly once.

Category Functions (? = optional)
billing Send(bill, cb(answer, ref?)) with bill = { to, from, amount, reason, label, account, kind = 'fine' \| 'medical' }; Kinds = { fine = true, medical = true }; Credits = true if your script pays the society itself
jail Send(target, minutes, reason, officer, cb(answer)) (minutes are the tablet's; convert them), Jailed?(src) -> minutes left; Unit = 'minutes' \| 'seconds'
medical Read(src) -> { state = 'ok' \| 'down' \| 'dead', parts = { head = 1..4, ... }, partKinds? = { lleg = 'gunshot', ... }, kinds?, bleeding = 0..4 }, Prefetch?(src, cb), Revive?(target) -> answer, Heal?(target, level) -> answer
records FindPeople(query, cb(list)), Person(id, cb), VehiclesOf(id, cb), FindPlate(plate, cb), Licences?(id, cb)
mdt Felony?(id, cb(true \| false \| nil)), Warrants?(id, cb), ActiveWarrants?(cb), Bolos?(cb); cb(nil) means "could not read"
dispatch (reading) Calls?(want) -> list, Attach?(id, src, on, cb(answer)), CanClose?(), Close?(id, src, cb(answer))

answer is 'done', 'refused' or 'unknown'.

Door locks (for add-on apps)

Script Read a door Lock / unlock
ox_doorlock yes yes. The phone checks the door's groups, characters and items first.
qb-doorlock no yes, for a player. qb-doorlock checks access itself.
cd_doorlock yes no: it documents only a client event to change a door, with no access check or answer
qs-doorlock-creator yes only for a caller that has decided itself. On a player's behalf it is refused: its setter skips its own permission checks and no permission check is published
nui_doorlock – Not supported. It has no server API and is archived.

Voice, target and notifications

  • Voice (calls): pma-voice, mumble-voip, SaltyChat, TokoVOIP, YACA.
  • Target (payphones, the Pulse Vending machines, a store counter's clerk): ox_target or qb-target when one runs. Otherwise the phone shows an [E] prompt.
  • Notifications: the phone shows its own notifications on the handset and does not need ox_lib, okokNotify, mythic_notify or your framework's notify. Scripts that send notifications to a phone reach it through the events in optional-developer-kit/EXPORTS.md.

Connecting a script that isn't listed

Every category is a provider: a table of functions the phone calls. To connect an in-house or unlisted script, register your own provider from your own resource. Pulse Phone picks it up at once and drops it when your resource stops:

Lua
-- in your resource (server side)
exports.phone:RegisterProvider('keys', 'my_keys', {
    Available = function() return GetResourceState('my_keys') == 'started' end,
    Describe  = function() return 'my_keys' end,
    GiveKeys  = function(src, plate, vehicle)
        exports.my_keys:GiveKey(src, plate)
        return true, 'my_keys'
    end,
}, 50)   -- rank: above the built-in ones (at most 40), so it wins in 'auto'

Or pin it: Config.Providers.keys = 'my_keys'.

Rules for a provider:

  • Never throw. For anything you can't answer, return nil, reason or false, reason (or call cb(nil, reason)).
  • A function that takes cb must always call it exactly once.
  • Available() is optional. Return false, reason while your script isn't ready.

optional-developer-kit/custom_provider_template.lua has complete housing, garage, dispatch and weather providers. The phone's own adapters in bridge/server/ show how every supported script is connected.

The functions each category needs

Category Functions (? = optional)
keys GiveKeys(src, plate, vehicle) -> ok, via
vehiclelock SetLocked(src, vehicle, plate, locked) -> ok, via, IsLocked?(vehicle)
fuel SetFuel(vehicle, level) -> ok, via (server), Client?() -> client adapter name
garage ListVehicles(src, cb(list)), GetGarageLocation?(name); set ValetUnsafe = true if your script keeps "parked" in its own column. Row shape: optional-developer-kit/CUSTOM_GARAGE.md
housing ListOwned(src, cb(list)), GetLocation?(id), SetLocked?(src, id, locked, cb), ListKeyholders?(src, id, cb), GrantAccess?(src, id, charId, cb), RevokeAccess?(src, id, holder, cb)
society GetBalance(job), AddMoney(job, amount, reason), RemoveMoney(job, amount, reason). Money moves answer true, false (nothing moved) or 'unconfirmed'.
statement GetStatement(src, limit, cb(rows)). Each row is { id, kind = 'sent' \| 'received', amount, party_name, note, at (ms) }.
inventory HasItem, GetItemCount, AddItem, RemoveItem, GetInventory, RegisterUsable?
dispatch Send(alert) -> count. alert = { title, body, code, jobs, coords, priority, caller }
doorlock GetDoor?(ref), CanOpen?(src, ref), SetLocked(ref, locked, src?)

Client-side key, lock and fuel scripts are listed in bridge/client/vehicle.lua. Add a line to its KEYS, LOCKS or FUEL table for your script, then return that name from your server provider (Client() for fuel; for keys, use the phone:keys:give relay as qs-vehiclekeys does; for locks, the phone:vehlock:set relay as t1ger_keys does).

A whole framework the phone has no adapter for: optional-developer-kit/custom_framework_bridge.lua, with Config.Framework = 'custom'.

  • GetCharacterId is required.
  • Leave out a name, job, licence or vehicle/home/business list function and the phone answers as a server with no such data would.
  • Leave out a money or item function and that action is refused (false, 'not-implemented'). The phone never pays from a bank of its own beside your framework's.
  • The Bank app appears only when the bridge has GetBankBalance.
  • If your core restarts while the phone keeps running, call exports.phone:FrameworkRestarted() once the core is ready, so the phone registers its usable items again.

Not supported, and why

  • nui_doorlock: no server API, and the repository is archived.
  • ps-dispatch 1.x: replaced by 2.x and 3.x, which are supported.
  • rcore_garage, loaf_garage: their storage isn't public. The Garage app lists vehicles from your framework's table and keeps valet off.
  • Chezza's inventory: no public documentation. On ESX it still works through ESX's own item functions.
  • Bank history for qs-banking, fd_banking, snipe-banking, tgg-banking and wasabi_banking: they publish no way to read it.
  • wasabi_banking shared and savings accounts: it documents GetPlayerAccounts, but with no account names or member roles, so the phone can't tell whether a member may take money out. They are left out of Wallet rather than let every member withdraw.
  • lb-tablet calls on the Calls board: lb-tablet documents no export that lists its dispatches and no server event when one is created or closed. Alerts the phone sends still reach lb-tablet (AddDispatch); the Calls board shows the calls the phone itself heard.
  • linden_outlawalert calls on the Calls board: heard only (wf-alerts:svNotify).
  • Closing or attaching to calls in cd_dispatch, wasabi_mdt and kartik-mdt: none of them has a server API for it. That stays in their own UI.
  • Writing into another MDT (ps-mdt, wasabi_mdt, kartik-mdt): none documents a server API for reports, warrants or fines, and Pulse never writes their tables. They are read only.

Every adapter is built only from each script's public documentation or public source. Where a detail isn't public, the phone doesn't guess: it skips that feature for that script and says so here and in phone:diag.

Video relay configuration (advanced)

Pulse supports direct WebRTC connectivity with TURN relay support for reliable cross-network video calling. For production servers, configure a TURN service before launch. Video uses the in-game camera; call sound uses the selected voice script. Players do not need a physical webcam.

  1. Obtain a TURN endpoint and credentials from your relay service, or configure coturn.
  2. Put the settings in a private configuration file beside server.cfg, outside the phone resource. Add exec pulse-services.cfg before ensure phone.
  3. Use set for credentials, never setr or sets. Do not put tokens or relay secrets in config/config.lua, a client script, NUI, a public repository or a support message.
  4. Restart Pulse and run phone:health in the server console. Correct any configuration errors.
server.cfg
# pulse-services.cfg — private, server-side
set phone_turn_urls       "turn:<your-relay-host>:3478?transport=udp,turns:<your-relay-host>:5349?transport=tcp"
set phone_turn_username   "<your-relay-username>"
set phone_turn_credential "<your-relay-password>"

Use the exact endpoints supplied by your service. A TURN login is different from a provider's management API token. Pulse accepts standard TURN credentials or coturn shared-secret credentials; services offering only a credential-generation API need a server-side integration for that API.

The STUN servers are in Config.WebRTC.iceServers in config/config.lua. The default entries help direct connections discover a network route. With TURN configured, Pulse uses the relay for video and filters direct network addresses from its signaling. The relay therefore needs enough bandwidth for your video calls and live streams. connectTimeout controls the picture connection window, and interrupted connections use bounded ICE retries.

Short-lived credentials (coturn). With coturn's use-auth-secret / static-auth-secret, give the phone the secret instead of a fixed login. Every call then gets its own credentials that expire, so a player who copies them out of a call can't keep using your relay:

server.cfg
set phone_turn_urls   "turn:<your-turn-host>:3478"
set phone_turn_secret "<the static-auth-secret from turnserver.conf>"
set phone_turn_ttl    14400     # seconds the credentials stay valid (60 to 86400; 4 hours by default)

With phone_turn_secret set, phone_turn_username and phone_turn_credential are not used. The shared secret stays on the server. Only expiring session credentials are sent to participants. Keep the TTL longer than your longest expected call; keep the server and relay clocks synchronized.