Shared
Shared export functions / types
Adds an application on the phone. Recommended to use on the server-side for optimization purposes.
Name | Type | Description |
---|
name | string | (Key / name / index) of the app |
data | AppConfig | Application config, following the applications.lua config format. |
locales | table | Table of locales for the app, it is inserted into ui.apps. . |
exports['high-phone']:addApplication('bankingv2', {
icon = {
imageUrl = "https://aka.ms/confidential",
background = "#1B1B1B"
},
preAdded = false,
removable = true,
size = 9.11,
inAppStore = true,
developer = "High Scripts",
preview = {},
banner = {
imageUrl = "https://aka.ms/confidential",
background = "#1C222C",
},
defaultSettings = {
notifications = { allow = true, alerts = 3 }
}
}, {
["en"] = {
label = "Banking",
description = "A very great banking application",
-- More locales if you wish to use the phone's built-in locale system instead of your own.
}
})
-- On the client-side:
exports['high-phone']:sendAppNui('bankingv2', {
action = 'myevent',
payload = {
hello = 'world'
}
})
Merges custom locales into existing ones. Useful for custom application labels and when using phone's built-in i18n module.
Name | Type | Description |
---|
locale | table | Table of locales |
exports['high-phone']:addLocales({
["en"] = {
ui = {
apps = {
myapp = {
label = "My App",
description = "This is a great app"
}
}
}
}
})
Formats a phone number string into what you have configured.
Name | Type | Description |
---|
number | string | Phone number that you want to format |
local formattedNumber = exports['high-phone']:formatNumber('1234567890')
Generates a phone number based on your config and returns it unformatted
local phoneNumber = exports['high-phone']:generateNumber()
Name | Type | Description |
---|
type | 'media' | 'contact' | 'note' | Attachment type |
content | Media | Contact | Note | Any attachments content (see below) |
Name | Type | Description |
---|
type | 'image' | 'video' | Media type |
url | string | Media URL |
Name | Type | Description |
---|
number | string | Phone number |
name | string | Name |
photo | string | Photo URL |
Name | Type | Description |
---|
title | string | Note title |
content | string | Note content |