SERVER EXPORTS

Generate Phone Number

Generates a new, unique, random phone number formatted according to the server's configuration.

local newNumber = exports["17mov_Phone"]:GeneratePhoneNumber()

Returns:

  • string: The generated phone number.

Get Identifier From Number

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.

local identifier = exports["17mov_Phone"]:GetIdentifierFromNumber(number)

Returns:

  • string: The identifier assigned to the given phone number.

Argument
Type
Optional
Explanation

number

number | string

โŒ

A target phone number

Get Number From Player

Retrieves the phone number currently active on a player's device using their Server ID (Source).

local phoneNumber = exports["17mov_Phone"]:GetNumberFromPlayer(src)

Returns:

  • string: The active phone number of the player.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

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).

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

notification

Notification

โŒ

The notification data object.

Notification Structure
ReplaceType Structure (Localization)

Use this structure if you want to use localized strings with dynamic replacements.

Send Notification (By Number)

Sends a notification to a player using their phone number.

Argument
Type
Optional
Explanation

number

string

โŒ

The target phone number.

notification

Notification

โŒ

The notification data object (same structure as above).

GetSignalTowers

Returns a table with all Signal Towers from config

Returns:

  • {coords: vector3, radius: number}[]

GetSignalLevelForCoords

Returns a 0-4 value that represent signal strenght for given coordinates

Argument
Type
Optional
Explanation

coords

vector3

โŒ

Coords to check signal

Returns:

  • number (0-4)

GetPlayerSignalLevel

Returns a current player signal strenght

Argument
Type
Optional
Explanation

playerId

number

โŒ

Player ID to check

Returns:

  • number (0-4)

AddSimcard

Adding a given player simcard with given number.

Argument
Type
Optional
Explanation

playerId

number

โŒ

Player ID to Give

number

string

โœ…

What number should be assigned. If no number is given then script will generate random

Returns:

  • boolean true if sucess

EjectSimCard

Eject simcard with given number, or if no number is given, then current phone will be ejected

Returns:

  • boolean true if sucess

Argument
Type
Optional
Explanation

playerId

number

โŒ

Player ID to Eject

number

string

โœ…

What number should be ejected. If no number is given, then current phone number will eject.

Last updated