Server Server export functions / types
Gets the player object that follows the bridge getPlayer
structure.
Name Type Description phoneNumber
string Phone number
local player = exports[ 'high-phone' ]: getPlayerByPhone ( '12345' )
print (player. id , player. identifier )
Gets player's phone object by their ID
Name Type Description id
number Player ID
local phone = exports[ 'high-phone' ]: getPlayerPhone ( 1 )
print (phone. number , phone. id , phone. settings )
Gets player's phone number by their ID
Name Type Description id
number Player ID
local phoneNumber = exports[ 'high-phone' ]: getPlayerPhoneNumber ( 1 )
print (phoneNumber)
Send a notification to a phone or a player
Name Type Description receiver
string Player ID or phone number data
NotificationData Notification data
exports[ 'high-phone' ]: sendNotification ( - 1 , {
application = { name = 'twizzler' },
title = 'Hello' ,
content = 'World!' ,
duration = 5000
})
Send mail from either the system or a player. To use HTML, action buttons, etc. you have to send a mail from the system by using one of the reservedUsers
addresses you've configured in the mail app configuration.
Name Type Description data
MailData Mail data
exports[ 'high-phone' ]: sendMail ({
sender = '12345' ,
recipients = { '[email protected] ' , '[email protected] ' },
subject = 'Hello World' ,
content = 'Hello Mars' ,
attachments = {
{
type = 'media' ,
content = {
type = 'image' , -- or 'video'
url = 'https://i.imgur.com/6AnLddq.png'
}
}
}
})
Get a player's mail account data
Name Type Description source
number Player's ID
local account = exports[ 'high-phone' ]: getPlayerMailAccount ( 1 )
print (account?. address )
Get an offline player's mail account data by player's identifier
Name Type Description identifier
string Player's identifier
local account = exports[ 'high-phone' ]: getOfflinePlayerMailAccount ( 'char1:2gtp1d6c57d7989ba1209e2c6gc9002f4872b856' )
print (account?. address )
Send a message to a number from a number
exports[ 'high-phone' ]: sendMessage ({
sender = '12345' ,
recipient = '123456' ,
content = 'Hello World' ,
attachments = {
{
type = 'media' ,
content = {
type = 'image' , -- or 'video'
url = 'https://i.imgur.com/6AnLddq.png'
}
}
}
})
Name Type Description sender
string Sender phone number recipient
string Recipient's phone number content
string Message content attachments
Attachment []Attachments
Name Type Description sender
string Sender phone number recipients
string | string[] Recipient mail addresses subject
string Mail subject content
string Mail content attachments
Attachment []Attachments
Name Type Description title
string Ad title content
string Ad content attachments
Attachment []Attachments