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
  • Listenable events
  • high_phone:openPhone
  • high_phone:closePhone
  • Triggerable events
  • high_phone:sendMailFromServer
  • high_phone:sendOfflineMailFromServerToAddress
  • high_phone:sendOfflineMailFromServer
  • high_phone:shareContactDetails
  • high_phone:updateData
  • high_phone:receivedMessage
  • high_phone:sendMessage
  • high_phone:postTweet

Was this helpful?

  1. high-phone
  2. Developers

Events

Our phone also has events! You can either listen to them or trigger them.

Listenable events

high_phone:openPhone

AddEventHandler("high_phone:openPhone", function()
    print("Phone has been opened")
end)

Client-sided event. Triggers when the phone is opened.

high_phone:closePhone

AddEventHandler("high_phone:closePhone", function()
    print("Phone has been closed")
end)

Client-sided event. Triggers when the phone is closed.

Triggerable events

high_phone:sendMailFromServer

-- Client-sided code:
TriggerServerEvent("high_phone:sendMailFromServer", senderData, subject, content, attachments)
-- Server-sided code:
TriggerEvent("high_phone:sendMailFromServer", senderData, subject, content, attachments, source)

Server-sided event. Sends a mail into your/player's phone if he has a mail account logged.

Can't be empty - *

Argument number
Argument name
Example value

1

senderData*

{

address = "bank@gmail.com",

name = "Bank", photo = ""

}

2

subject*

"Income"

3

content*

"You have received $ 100"

4

attachments*

{

{image = "https://image.link/image.png"} }

5

source

1

high_phone:sendOfflineMailFromServerToAddress

-- Server-sided code:
TriggerEvent("high_phone:sendOfflineMailFromServerToAddress", address, senderData, subject, content, attachments)

Server-sided event. Sends a mail into an offline player's mail account.

Can't be empty - *

Argument number
Argument name
Example value

1

address*

"email@gmail.com"

2

senderData*

{

address = "bank@gmail.com",

name = "Bank", photo = ""

}

3

subject*

"Income"

4

content*

"You have received $ 100"

5

attachments*

{

{image = "https://image.link/image.png"}

}

high_phone:sendOfflineMailFromServer

-- Server-sided code:
TriggerEvent("high_phone:sendMailFromServer", identifier, senderData, subject, content, attachments)

Server-sided event. Sends a mail into an offline player's phone if he has a mail account logged.

Can't be empty - *

Argument number
Argument name
Example value

1

identifier*

Steam/Rockstar/IP/Discord

2

senderData*

{

address = "bank@gmail.com",

name = "Bank", photo = ""

}

3

subject*

"Income"

4

content*

"You have received $ 100"

5

attachments*

{

{image = "https://image.link/image.png"}

}

high_phone:shareContactDetails

TriggerEvent("high_phone:shareContactDetails")

Client-sided event. Shares your own contact details to the nearest player. Max distance can be configured in high_phone/config.lua

high_phone:updateData

TriggerEvent("high_phone:updateData") -- Client-side
TriggerClientEvent("high_phone:updateData", source) -- Server-side

Client-sided event. Updates the player's phone data.abs

high_phone:receivedMessage

-- Client-sided code
TriggerEvent("high_phone:receivedMessage", number, content, attachments)
-- Server-sided code
TriggerClientEvent("high_phone:receivedMessage", source, number, content, attachments)

Client-sided event. Manipulates a receival of a message (sends a message to your phone from a specified number)

Can't be empty - *

Argument number
Argument name
Example value

1

number*

"123-4567"

2

content*

"Hello"

3

attachments* (JSON)

json.encode({

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

high_phone:sendMessage

TriggerServerEvent("high_phone:sendMessage", number, content, attachments)

Server-sided event. Sends a message to a specified number.

Can't be empty - *

Argument number
Argument name
Example value

1

number*

"123-4567"

2

content*

"Hello"

3

attachments* (JSON)

json.encode({image = "https://imagelink.com/image.png"})

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:

TriggerServerEvent(
    "high_phone:sendMessage", 
    "02", 
    "Person dead at" .. string.format("(GPS:%s,%s)", 123.0, 123.0)
)

Make sure you replace 123.0, 123.0 with the actual coordinates!

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

json.encode({
    {image = "https://imagelink.com/image.png"}
})

A whole event example:

TriggerServerEvent(
    "high_phone:sendMessage", 
    "111-11111", 
    "Here's an attachment", 
    json.encode({
        {image = "https://imagelink.com/image.png"}
    })
)

high_phone:postTweet

TriggerServerEvent("high_phone:postTweet", title, content, image)

Server-sided event. Posts a tweet from player's phone in twitter app.

Can't be empty - *

Argument number
Argument name
Example value

1

title*

"Tweet Title"

2

content*

"Hello"

3

image*

"https://imagelink.com/image.png" or ""

PreviousJavascript APINextCreating new apps

Last updated 2 years ago

Was this helpful?

👩‍💻