Server

Phone (server). getPlayerPhone returns a player's number, sendEmail delivers an email to their phone, through the active phone resource (Config.Phone).

Phone (server)

Regular clients don't load this module, see client.

getPlayerPhone(src)

local number = bridge.phone.getPlayerPhone(src)
ParamTypeDescription
srcnumberPlayer server id

| Returns | string \| number \| false — the phone number, false when the player has no phone, no number yet, or no phone resource is installed |

sendEmail(src, email, title, message)

local sent = bridge.phone.sendEmail(src, 'bank@maze.com', 'Statement ready', 'Your statement is available.')
ParamTypeDescription
srcnumberPlayer server id (the recipient)
emailstringSender shown in the inbox
titlestringSubject
messagestringBody

| Returns | boolean — true when the mail was handed to the phone, false otherwise |

All four arguments are checked. A non-numeric src or non-string text returns false without reaching the phone resource.

Per phone

PhonegetPlayerPhonesendEmail
kora_phoneSelected handset's active SIM numberSystem mail to the character's Mail app
sd-phoneThrough its lb-phone compatibility layerSystem mail to the player's first mail account
sky_phoneNative exportNot supported. sky_phone has no way to send mail, so this returns false
lb-phoneEquipped phone numberMail to the number's email address. The phone must be equipped (used) first
gksphone, okokPhone, yseries, qb-phoneNative exportNative mail
qs-smartphoneqs-base exportSendMail. qs mails have no sender field, so email is not shown

A stopped or missing phone resource returns false and prints one console line. See Missing or broken providers.

On this page