Documentation Index
Fetch the complete documentation index at: https://docs.roadshop.org/llms.txt
Use this file to discover all available pages before exploring further.
Metadata Exports
RoadPhone Pro’s metadata system stores phone data directly on inventory items, enabling features like phone stealing and trading. These exports allow external resources to interact with phone metadata.Helper Functions
GetPhoneMetadataOnly
Get the complete metadata object for a player’s active phone.The player’s server ID.
The complete phone metadata table, or
nil if not found.This is a lightweight function that uses the active phone slot. Use this when you only need to read metadata without modifying it.
UpdatePhoneMetadataField
Update a single top-level field in phone metadata.The player’s server ID.
The metadata field name to update (e.g.,
'phone_background').The new value for the field. Use
nil to remove the field.true if successful, false otherwise.UpdatePhoneMetadataNested
Update a nested field within phone metadata.The player’s server ID.
The parent field name (e.g.,
'phone_settings').The child field name (e.g.,
'brightness').The new value for the nested field.
UpdatePhoneMetadataArray
Perform array operations (add/update/delete) on metadata arrays.The player’s server ID.
The array field name (e.g.,
'phone_contacts').The operation type:
'add', 'update', or 'delete'.For
'add'/'update': the item object. For 'delete': the ID value.The field name used as identifier (e.g.,
'id').Optional maximum array size (only for
'add' operations).Phone Number & Setup
GetPhoneNumberFromItem
Get the phone number from a player’s phone item.The player’s server ID.
Optional specific inventory slot to check.
Returns phone number, item name, slot number, and full metadata.
AssignPhoneNumberToItem
Assign a new phone number to a phone item.The player’s server ID.
The phone item name.
The inventory slot number.
Success status and the assigned phone number.
GetOrCreatePhoneNumber
Get the phone number for a player, creating one if necessary.The player’s server ID.
The phone number and whether it was newly created.
GetPhoneSetupFromItem
Check if the phone has completed initial setup.1 if setup is complete, 0 if setup is needed.UpdatePhoneSetup
Update the phone setup status.1 for complete, 0 for needs setup.Background & Settings
GetPhoneBackground
Get the phone’s wallpaper background.The background URL/path, or
nil if using default.UpdatePhoneBackground
Set the phone’s wallpaper background.The background URL/path, or
nil to reset to default.GetPhoneSettingsFromMetadata
Get all phone settings.Settings object with:
brightness, flightmode, large_app_icons, iconcolor, darkmode, timeCustomization.UpdatePhoneSettings
Update phone settings.Table with settings to update. Only provided keys will be changed.
PIN/Passcode
GetPhonePin
Get the phone’s PIN configuration.Table with
pin (string, 6 digits) and pin_needed (0 or 1).UpdatePhonePin
Update the phone’s PIN.The 6-digit PIN code, or
nil to remove.1 to require PIN on unlock, 0 to disable.Contacts
GetPhoneContacts
Get all contacts from the phone.Array of contact objects.
AddContactToMetadata
Add a new contact.Contact object with
id, name, number, and optional avatar.UpdateContactInMetadata
Update an existing contact.DeleteContactFromMetadata
Delete a contact.UpdatePhoneContacts
Replace the entire contacts array in metadata.Array of contact objects to replace all existing contacts.
Notes
GetPhoneNotes
Get all notes from the phone.AddNoteToMetadata
Add a new note.Note object with
id, title, content, created_at.UpdateNoteInMetadata
Update an existing note.DeleteNoteFromMetadata
Delete a note.UpdatePhoneNotes
Replace the entire notes array in metadata.Array of note objects to replace all existing notes.
Photos
GetPhonePhotos
Get all photos from the phone.AddPhotoToMetadata
Add a new photo.Photo object with
id, url, created_at, and optional favorite.UpdatePhotoInMetadata
Update photo properties (e.g., favorite status).DeletePhotoFromMetadata
Delete a photo.UpdatePhonePhotos
Replace the entire photos array in metadata.Array of photo objects to replace all existing photos.
Albums
GetPhoneAlbumsFromMetadata
Get all photo albums from the phone.The player’s server ID.
Array of album objects, or empty table if none exist.
AddAlbumToPhoneMetadata
Create a new album.Album object with
id, name, photoIds fields.UpdateAlbumInMetadata
Update specific fields of an existing album.The album’s identifier.
Key/value pairs to merge into the album.
DeleteAlbumFromMetadata
Delete an album.The album’s identifier.
AddPhotoToAlbumMetadata
Add a photo to an album. Skips duplicates.The album’s identifier.
The photo’s identifier to add.
true on success (or if already exists), false if album not found.RemovePhotoFromAlbumMetadata
Remove a photo from an album.The album’s identifier.
The photo’s identifier to remove.
AddMultiplePhotosToAlbumMetadata
Add multiple photos to an album at once. Skips duplicates.The album’s identifier.
Array of photo identifiers to add.
Alarms
GetPhoneAlarms
Get all alarms from the phone.AddAlarmToMetadata
Add a new alarm.UpdateAlarmInMetadata
Update an existing alarm.DeleteAlarmFromMetadata
Delete an alarm.UpdatePhoneAlarms
Replace all alarms on the phone at once.The player’s server ID.
Array of alarm objects to set. Pass
{} to clear all alarms.true if the metadata was updated successfully, false otherwise.Messages
GetPhoneMessages
Get all messages from the phone.AddMessageToMetadata
Add a new message to the phone.MarkMessagesReadInMetadata
Mark messages from a specific number as read.UpdatePhoneMessages
Replace all messages on the phone at once. Messages are automatically limited to the configured maximum (default 300).The player’s server ID.
Array of message objects to set.
Number of unread messages. Defaults to
0.true if the metadata was updated successfully, false otherwise.Radio Channels
GetRadioChannelsFromMetadata
Get saved radio channels.AddRadioChannelToMetadata
Add a saved radio channel.UpdateRadioChannelInMetadata
Update a saved radio channel.DeleteRadioChannelFromMetadata
Delete a saved radio channel.GetRadioRecentFromMetadata
Get recent radio frequencies.AddRadioRecentToMetadata
Add a frequency to recent list.ClearRadioRecentFromMetadata
Clear all recent frequencies.UpdateRadioChannels
Replace all saved radio channels on the phone at once.The player’s server ID.
Array of radio channel objects to set. Pass
{} to clear all channels.true if the metadata was updated successfully, false otherwise.Social Media Accounts
TweetWave
Backwards Compatibility: The old
*TwitterAccount* export names still work but are deprecated.Connect
RoadID Account
App Layout
GetPhoneAppsFromMetadata
Get installed apps and homescreen layout.Object with
installed (array of app IDs) and homescreen (layout data).UpdateInstalledApps
Update the list of installed apps.UpdateHomescreenLayout
Update the homescreen layout (pages and dock).UpdatePhoneApps
Replace the entire apps data (installed apps and homescreen layout) at once.The player’s server ID.
Object with
installed (array of app IDs) and homescreen (layout data).true if the metadata was updated successfully, false otherwise.Backup System
Backup functions require
Config.BackupEnabled = true in the configuration.CreatePhoneBackup
Create a backup of all phone data.Optional custom name for the backup. Defaults to timestamp.
'manual' or 'auto'. Defaults to 'manual'.GetPhoneBackups
Get all backups for the player.Array of backup objects with
backup_id, backup_name, created_at, backup_type.RestorePhoneBackup
Restore phone data from a backup.The UUID of the backup to restore.
DeletePhoneBackup
Delete a backup.Metadata Limits
Phone metadata has built-in limits to prevent inventory bloat:| Data Type | Limit |
|---|---|
| Messages | 300 |
| Contacts | 200 |
| Notes | 150 |
| Photos | 150 |
| Alarms | 30 |
| Radio Channels | 30 |