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.

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.

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.

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)

high_phone:sendMessage

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

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

high_phone:postTweet

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

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

Last updated