GetPhoneNumberFromIdentifier
The GetPhoneNumberFromIdentifier export allows you to retrieve a player's phone number based on their identifier. It prioritizes the phone the player has used most recently, or if unused, retrieves any phone from their inventory.
How to Use
To get a player's phone number, use the following code:
Parameters
identifier: The player's unique identifier, such as
ESX.GetPlayerFromId(source).identifier
.owner: A boolean (
true
orfalse
). Iftrue
, it ensures the phone number belongs to the identifier (useful for handling stolen phones).
This export is particularly useful for verifying ownership or retrieving contact details dynamically. It returns the phone number as a string or false
if no phone number is found.
Last updated