Skip to main content
The Phone component provides server-side notification delivery and client-side UI control. Other resources interact with the phone primarily through notifications and data updates.

Overview

Access via Phone on both server and client.

Notifications

Push notifications to players

Phone Data

Manage app data

UI Control

Open, close, and manage phone state

Permissions

App-level permission checks

Server-Side Methods

Primary Server API: The main way other resources interact with the phone server-side is through Phone.Notification. Direct data manipulation should be rare.

Phone.Notification:Add

Send a notification to a player’s phone.
number
required
Player server ID
string
required
Notification title
string
required
Notification body text
number
required
Timestamp (use os.time())
number
required
Display duration in milliseconds
string
required
App identifier (e.g., 'messages', 'email', 'bank')
table
Action buttons on the notification
table
Additional data payload
Example:

Phone.Notification:AddWithId

Send a notification with a specific ID for tracking and updating.
string
required
Unique notification identifier for later updates/removal
All other parameters are the same as Notification:Add. Example:

Phone.Notification:Update

Update an existing notification by ID.
number
required
Player server ID
string
required
Notification ID (from AddWithId)
string
required
New title
string
required
New description
Example:

Phone.Notification:RemoveById

Remove a notification by its ID.

Phone:UpdateJobData

Update a player’s job data on their phone (permissions, apps, etc.).
number
required
Player server ID
boolean
If true, returns the data instead of sending to client
table
When returnValues is true: {charJobPerms = table, jobData = table}

Client-Side Methods

Phone:Open

Opens the phone UI.

Phone:Close

Closes the phone UI.
boolean
Force close, skip route reset
boolean
Skip route reset behavior

Phone:IsOpen

Check if the phone UI is currently open.
boolean
true if phone is open
Example:

Phone:OpenLimited

Opens the phone in limited mode (e.g., for payphones).

Phone:OpenPayphone

Opens the phone specifically for payphone use.

Phone:IsAppUsable

Check if a specific app is installed and usable by the current player.
string|table
required
App identifier or table of app identifiers
boolean
true if the app is accessible

Phone Data Methods (Client)

Phone.Data:Set

Set phone data by key.

Phone.Data:Add

Add data to the phone store.

Phone.Data:Update

Update existing phone data.

Phone.Data:Remove

Remove phone data by key and ID.

Phone.Data:Reset

Clear all phone data.

Permissions (Client)

Phone.Permissions:HasPermission

Check if the current player has a specific app permission.
string
required
App identifier
string
required
Permission name
boolean
true if player has the permission
Example:

Best Practices


Next Steps

Phone - Events

Phone events and middleware

Phone - Apps

App configuration and restrictions

Characters API

Character data access