Skip to content

Phone

Common phone scripts are detected (list). Without one, only the framework’s own number is shown and changed. src is nil while the player is offline.

EntryFileReceivesReturns
phoneInfoframework.luacitizenId, srcTable below, or false, 'no_phone'
phoneSetNumberframework.luacitizenId, src, numbertrue, or false, 'taken' / 'online' / text
phoneActionframework.luacitizenId, src, action, argstrue, false, 'reason', or nil to let the built-in handle it
phoneReloadclient.luasystemtrue after your phone refreshed the number

action is one of notify, message, mail, verify, block, setField, resetSecurity, factoryReset, wipe. Only buttons turned on in features are shown.

editable/framework.lua
EditableServer.phoneInfo = {
custom = true,
fn = function(citizenId, src)
local number = exports['my_phone']:GetNumber(citizenId)
if not number then return false, 'no_phone' end
return {
system = 'my_phone', online = src ~= nil, number = number,
social = {},
features = { setNumber = true, notify = true },
fields = {},
}
end,
}