Server Server export functions / types
Gets the player object that follows the bridge getPlayer structure.
Name Type Description phoneNumberstring 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 idnumber 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 idnumber Player ID
local phoneNumber = exports[ 'high-phone' ]: getPlayerPhoneNumber ( 1 )
print (phoneNumber)
Send a notification to a phone or a player
Name Type Description receiverstring Player ID or phone number dataNotificationData 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 dataMailData 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 sourcenumber 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 identifierstring 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'
}
}
}
})
End a phone call of a player
Name Type Description idnumber Player ID
exports[ 'high-phone' ]: endCall ( 1 )
Name Type Description senderstring Sender phone number recipientstring Recipient's phone number contentstring Message content attachmentsAttachment []Attachments
Name Type Description senderstring Sender phone number recipientsstring | string[] Recipient mail addresses subjectstring Mail subject contentstring Mail content attachmentsAttachment []Attachments
Name Type Description titlestring Ad title contentstring Ad content attachmentsAttachment []Attachments