SERVER EXPORTS

PhoneContact Structure
{
  "id": 1,
  "number": "555-0123",
  "contactNumber": "555-9876",
  "name": "John Doe",
  "firstname": "John",
  "lastname": "Doe",
  "notes": "Best Mechanic",
  "image": "[https://example.com/avatar.jpg](https://example.com/avatar.jpg)",
  "isBlocked": false,
  "favorite": true
}
PhoneCall Structure
{
  "callId": "unique-uuid",
  "fromId": 1,
  "fromNumber": "555-0101",
  "toId": 2,
  "toNumber": "555-0202",
  "callTime": 1678900000,
  "inCall": true,
  "type": "phone",
  "isNumberHidden": false,
  "isCompanyCall": false
}

Fetch Contacts (By Source)

Retrieves a list of all contacts belonging to a player using their Server ID (Source).

local contacts = exports["17mov_Phone"]:PhoneApp_FetchContactsBySrc(src)

Returns:

  • PhoneContact[]: An array of contact objects.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

Fetch Contacts (By Number)

Retrieves a list of all contacts belonging to a player using their phone number.

local contacts = exports["17mov_Phone"]:PhoneApp_FetchContactsByNumber(number)

Returns:

  • PhoneContact[]: An array of contact objects.

Argument
Type
Optional
Explanation

number

number

โŒ

The player's phone number.

Add Contact (By Source)

Adds a new contact to the player's phone book using their Server ID (Source).

local result = exports["17mov_Phone"]:PhoneApp_AddContactBySrc(src, contactNumber, firstname, lastname, notes, image)

Returns:

  • table: { success: boolean, contact?: PhoneContact, message?: string }

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

contactNumber

string

โŒ

The phone number of the contact to add.

firstname

string

โŒ

The contact's first name.

lastname

string

โŒ

The contact's last name.

notes

string

โœ…

Optional notes about the contact.

image

string

โœ…

Optional URL for the contact's avatar.

Add Contact (By Number)

Adds a new contact to the player's phone book using their phone number.

local result = exports["17mov_Phone"]:PhoneApp_AddContactByNumber(number, contactNumber, firstname, lastname, notes, image)

Returns:

  • table: { success: boolean, contact?: PhoneContact, message?: string }

Argument
Type
Optional
Explanation

number

number

โŒ

The player's phone number.

contactNumber

string

โŒ

The phone number of the contact to add.

firstname

string

โŒ

The contact's first name.

lastname

string

โŒ

The contact's last name.

notes

string

โœ…

Optional notes about the contact.

image

string

โœ…

Optional URL for the contact's avatar.

Delete Contact

Permanently removes a contact from the player's phone book.

local success = exports["17mov_Phone"]:PhoneApp_DeleteContact(contactId)

Returns:

  • boolean: true if the contact was successfully deleted.

Argument
Type
Optional
Explanation

contactId

number

โŒ

The ID of the contact to delete.

Start Call

Initiates a call between two phone numbers. Useful for NPC interactions or automated services.

local callData = exports["17mov_Phone"]:PhoneApp_StartCall(from, to, type)

Returns:

  • PhoneCall | false: The call object if successful, or false if it failed.

Argument
Type
Optional
Explanation

from

string

โŒ

Caller's phone number.

to

string

โŒ

Receiver's phone number.

type

"phone" | "video"

โœ…

Is video-call or default call?

End Call (By Source)

Ends any active call for a player using their Server ID (Source).

local success = exports["17mov_Phone"]:PhoneApp_EndCallBySrc(src)

Returns:

  • boolean: true if a call was found and ended.

Argument
Type
Optional
Explanation

src

number

โŒ

Player ID

End Call (By Number)

Ends any active call for a player using their phone number.

local success = exports["17mov_Phone"]:PhoneApp_EndCallByNumber(number)

Returns:

  • boolean: true if a call was found and ended.

Argument
Type
Optional
Explanation

number

number | string

โŒ

Number of player in call to end

Check If In Call (By Source)

Checks if a player is currently in an active call using their Server ID (Source).

local inCall = exports["17mov_Phone"]:PhoneApp_IsInCallBySrc(src)

Returns:

  • boolean: true if the player is in a call.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

Check If In Call (By Number)

Checks if a player is currently in an active call using their phone number.

local inCall = exports["17mov_Phone"]:PhoneApp_IsInCallByNumber(number)

Returns:

  • boolean: true if the player is in a call.

Argument
Type
Optional
Explanation

number

number | string

โŒ

Player number

Last updated