Skip to content

Phone

Commands and exports

Commands

CommandWhoDoes
/phoneEveryoneOpen and close the phone (renamed with command in the config)
phonecheckAdmins, consolePrint the start-up report again
phoneverify <app> <username> <1 or 0>Admins, consoleGive or take a verified badge on a social account
phonepassword <app> <username> <password>Admins, consoleReset a social account's password
phoneprune <days>Admins, consoleDelete texts, calls, mail and posts older than that many days

Admins are players with the lwk_phone.admin ace.

Server exports

Names follow LB Phone's where the meaning is the same, so scripts written for that phone need little changing.

ExportReturnsDoes
GetEquippedPhoneNumber(source)string | nilThe number of the phone they're using
GetSourceFromNumber(number)number | nilWho has that phone
HasPhoneItem(source)booleanWhether they carry a phone
IsInCall(source)boolean
SendNotification(sourceOrNumber, notification){ app, title, content }
SendMessage(from, to, text)A text. from can be a name such as 'Bank'
SendMail(mail){ to, sender, subject, message }
AddTransaction(number, amount, label)A line in Wallet history. Move the money yourself
CreateCall(source, call){ number, video, hidden }
exports.lwk_phone:SendMessage('Bank', '555-0142', 'Your card was declined.')
exports.lwk_phone:SendMail({ to = '[email protected]', sender = 'City Hall', subject = 'Permit', message = 'Approved.' })

Client exports

ExportReturnsDoes
IsOpen()boolean
ToggleOpen(open)true, false, or nil to toggle
SendNotification(notification){ app, title, content }
AddCustomApp(app)See Community apps
RemoveCustomApp(identifier)
SendCustomAppMessage(identifier, data)Data to your app's page
usePhoneThe inventory item's use handler; point your item at it