PhoneTrackerCompatibility

Phones

Phone scripts PhoneTracker can talk to, and how each one finds a number.

On start, the script walks this adapter table and keeps the first name whose GetResourceState is started:

Resource nameHow it resolves a number
gksphoneLoop online players; exports['gksphone']:GetPhoneBySource(playerId)
lb-phoneexports['lb-phone']:GetSourceFromNumber(phoneNumber)
NPWDLoop online players; exports.npwd.getPlayerData({ source }).phoneNumber
okokPhoneLoop online players; exports.okokPhone:getPhoneNumberFromSource(playerId)
qs-smartphoneLoop online players; exports['qs-base']:GetPlayerPhone(playerId)
qb-phoneOpenFindSourceByCharPhone(phoneNumber)
qs-smartphone-proLoop online players; exports['qs-smartphone-pro']:GetPhoneNumberFromIdentifier(identifier, false)
roadphoneexports['roadphone']:getPlayerFromPhone(phoneNumber) → .source
yseriesLoop online players; exports.yseries:GetPhoneNumberBySourceId(playerId)

Adapters live in resource/server/tracker.lua. There are no other phone names in the tree.

OpenFindSourceByCharPhone

Used only by the qb-phone adapter. Phone lives on charinfo, not a phone-resource export.

Override OpenFindSourceByCharPhone in resource/open/server/phone_lookup.lua if your stack stores numbers somewhere else.

Shipped logic:

  1. Framework qbx_core — exports.qbx_core:GetPlayer(playerId).PlayerData.charinfo.phone
  2. Framework qb-core — QBCore.Functions.GetPlayer(playerId).PlayerData.charinfo.phone
  3. Anything else — false

On this page