High Scripts
  • Welcome
  • Information
    • Discord
    • Licensing System
    • Terms of service
  • high-phone
    • 📀Installation
    • ⚠️Common issues
    • ⚙️Configuration
      • 🖼️Imgur setup
      • 👮Job contacts
      • 🚑Distress Signals
      • 🥯OX-Mysql compatibility
      • 🇺🇸Adding translation files
    • 👩‍💻Developers
      • Client-side exports
      • Server-side exports
      • Javascript API
      • Events
      • Creating new apps
  • HIGH-3DSOUNDS
    • 📀Installation
    • ⚠️Common issues
    • 👩‍💻Developer API
      • Client-side exports
      • Server-side exports
Powered by GitBook
On this page
  • setPlayerPhoneNumber(source, number)
  • getPlayerPhoneNumber(source)
  • getPlayerBankNumber(source)
  • setPlayerBankNumber(source, number)
  • getPlayerMailAddress(source)
  • getPlayerTwitterEmail(source)
  • getPlayerTwitterData(source)
  • sendMessageToNumber(number, from, content, attachments)
  • sendMessageToPlayer(playerSource, from, content, attachments)

Was this helpful?

  1. high-phone
  2. Developers

Server-side exports

Here you can find all the server-side exports of our phone.

setPlayerPhoneNumber(source, number)

exports.high_phone:setPlayerPhoneNumber(source, number)

Sets a specified online player's phone number. It does not modify the number inside the database! Only in the players cache.

Argument number
Argument name
Example value

1

source

1

2

number

"123"

getPlayerPhoneNumber(source)

local phoneNumber = exports.high_phone:getPlayerPhoneNumber(source)

Gets a specified online player's phone number.

Argument number
Argument name
Example value

1

source

1

Returns a string containing the player's phone number.

getPlayerBankNumber(source)

local bankNumber = exports.high_phone:getPlayerBankNumber(source)

Gets a specified online player's bank number.

Argument number
Argument name
Example value

1

source

1

Returns a string containing the player's bank number.

setPlayerBankNumber(source, number)

exports.high_phone:setPlayerBankNumber(source, number)

Sets a specified online player's bank number. It does not modify the number inside the database! Only in the players cache.

Argument number
Argument name
Example value

1

source

1

2

number

"123"

getPlayerMailAddress(source)

local mailAddress = exports.high_phone:getPlayerMailAddress(source)

Gets a specified online player's mail address.

Argument number
Argument name
Example value

1

source

1

Returns a string containing the player's current mail address.

getPlayerTwitterEmail(source)

local mailAddress = exports.high_phone:getPlayerTwitterEmail(source)

Gets a specified online player's twitter mail address.

Argument number
Argument name
Example value

1

source

1

Returns a string containing the player's current twitter mail address.

getPlayerTwitterData(source)

local twitterData = exports.high_phone:getPlayerTwitterData(source)

Gets a specified online player's twitter data.

Argument number
Argument name
Example value

1

source

1

{
    id = 0,-- The ID of the account.
    email = "123", -- The email address of the account.
    nickname = "Example", -- The nickname of the account.
    picture = "https://image.com/image.png", -- The profile picture of the account.
    banner = "https://image.com/image.png", -- The banner of the account.
    joinedAt = 0, -- Timestamp in milliseconds when the account was created.
    followers = "[]", -- Json encoded list of followers.
    following = "[]", -- Json encoded list of users that the player follows.
    blockedUsers = "[]", -- Json encoded list of blocked users.
    bannedUntil = 0, -- Timestamp until when the account is banned.
    rank = "default" -- The account's rank.
}

Returns nil if the player is not logged into twitter.

sendMessageToNumber(number, from, content, attachments)

local success = exports.high_phone:sendMessageToNumber(number, from, content, attachments)

Sends a message to the specified phone number, notifies the player with that number if online.

Argument number
Argument name
Example value
Description

1

number

"123"

The number that the message should be sent to.

2

from

"123"

The number that the message will come from.

3

content

"Test Message"

The message text content.

4

attachments

{{image: "Test"}} OR json.encode({image: "Test"})

Either a table or a json encoded string of attachments.

Returns true once the message is successfully sent.

This is different from other phones, here you have to send the location in the content with this code:

string.format("(GPS:%s,%s)", x, y) -- x, y being the coordinates of the location.

For example if you want to send the location, an example of the code would be:

exports.high_phone:sendMessageToNumber(
    "123", 
    "123", 
    "Person dead at" .. string.format("(GPS:%s,%s)", 123.0, 123.0)
)

Make sure you replace 123.0, 123.0 with the actual coordinates! That's only an example!

Lets say you want to attach an image to the message, use this table to add messages:

{
    {image = "https://imagelink.com/image.png"}
}

A whole event example:

exports.high_phone:sendMessageToNumber(
    "123",
    "123",
    "Here's an attachment",
    {
        {image = "https://imagelink.com/image.png"}
    }
)

sendMessageToPlayer(playerSource, from, content, attachments)

local success = exports.high_phone:sendMessageToPlayer(playerSource, from, content, attachments)

Sends a message to the specified online player.

Argument number
Argument name
Example value
Description

1

playerSource

1

The player that the message should be sent to.

2

from

"123"

The number that the message will come from.

3

content

"Test Message"

The message text content.

4

attachments

{{image: "Test"}} OR json.encode({image: "Test"})

Either a table or a json encoded string of attachments.

Returns true once the message is successfully sent and false if the player is offline/not found.

This is different from other phones, here you have to send the location in the content with this code:

string.format("(GPS:%s,%s)", x, y) -- x, y being the coordinates of the location.

For example if you want to send the location, an example of the code would be:

exports.high_phone:sendMessageToNumber(
    "123", 
    "123", 
    "Person dead at" .. string.format("(GPS:%s,%s)", 123.0, 123.0)
)

Make sure you replace 123.0, 123.0 with the actual coordinates! That's only an example!

Lets say you want to attach an image to the message, use this table to add messages:

{
    {image = "https://imagelink.com/image.png"}
}

A whole event example:

exports.high_phone:sendMessageToNumber(
    "123",
    "123",
    "Here's an attachment",
    {
        {image = "https://imagelink.com/image.png"}
    }
)
PreviousClient-side exportsNextJavascript API

Last updated 2 years ago

Was this helpful?

👩‍💻