Retrieves the player identifier (license) associated with a specific phone number. This function works even if the player is offline, as it checks the database.
Retrieves the phone number currently in use by a player based on their unique identifier
Returns:
string / nil playerNumber: The phone number currently used by the player, or nil if the player is offline or has no active number.
Arguments:
Argument
Type
Optional
Explanation
identifier
string
โ
Player identifier
Get Player Source From Number
Retrieves the Server ID (Source) of an online player currently using the specified phone number.
Returns:
number | nil: The player's server ID if they are online and using the number, otherwise nil.
Argument
Type
Optional
Explanation
number
number | string
โ
A target phone number
Set Phone Block State
Blocks or unblocks a player from using their phone. When blocked, the player cannot open the phone interface. This is useful for situations like being handcuffed, unconscious, or in a restricted zone.
Argument
Type
Optional
Explanation
src
number
โ
The player's server ID (source).
state
boolean
โ
true to block the phone, false to unblock.
Change User Password
Changes the user password for a specific application account (e.g., Darkchat, Swiply). This is useful for "forgot password" mechanics or admin tools.
Returns:
boolean: true if the password was changed successfully.
Argument
Type
Optional
Explanation
app
string
โ
The internal name of the app (e.g., "darkchat", "swiply").
username
string
โ
The username of the account.
newPassword
string
โ
The new password to set.
Send Notification (By Source)
Sends a notification to a player using their Server ID (Source).
{
app = "MESSAGES", -- App identifier (e.g., "MESSAGES", "BANK", "SYSTEM")
title = "New Alert", -- Title string or ReplaceType object
message = "This is a test notification", -- Message string or ReplaceType object
data = {
href = "/messages/1", -- (Optional) Internal link to open on click
alwaysShow = true -- (Optional) Show even if app is open
}
}
{
key = "LocaleKey", -- e.g., "Messages:NewMessage"
replace = "%s", -- Placeholder to replace
value = "John Doe" -- Value to insert
}
local settings = exports["17mov_Phone"]:GetPhoneSettings(number)
---@class PhoneSettings
---@field number string Phone number
---@field configured boolean Whether phone is configured
---@field language string Language code
---@field wallpaper string | nil Wallpaper url | nil for default
---@field theme 'dark' | 'light' Theme
---@field frameColor string Frame color hex code
---@field planemode boolean Whether planemode is enabled
---@field easydrop boolean Whether easydrop is enabled
---@field location boolean Whether location is enabled
---@field silentMode boolean Whether silent mode is enabled
---@field pinCode string | nil Phone pin code | nil if not set
---@field faceId string | nil Face ID owner identifier | nil if not set
---@field ringtoneVolume number Ringtone volume (0-100)
---@field notificationVolume number Notifications volume (0-100)
---@field mediaVolume number Media volume (0-100)
---@field ringtoneSound string | nil Ringtone sound name | nil for default
---@field notificationSound string | nil Notification sound name | nil for default
---@field streamerMode boolean Whether streamer mode is enabled
---@field scale number | nil Phone scale | nil for default
---@field companiesCalls boolean Whether companies call are enabled
---@field companiesNotifications boolean Whether companies notifications are enabled
---@field mycard {firstname: string; lastname: string; image: string; notes: string} | nil Player phone card data | nil if not set
---@field hideNumber boolean Whether to hide number on calls
local phoneConfig = exports["17mov_Phone"]:GetConfig()
local config = exports["17mov_Phone"]:GetConfig()
-- Check if phones are unique (metadata-based)
if config.UniquePhones then
print("The server is using unique phone items")
end
-- Accessing specific app settings
local showNumber = config.Apps['Companies'].ShowCompanyExactNumber
print("Show exact company number: " .. tostring(showNumber))