Features

Admin tablet

The admin tablet, roles, backups, data retention and general limits.

Staff manage fx-phone from an admin tablet: social accounts, posts, listings, users, SIM cards, phone shops, apps, settings and backups. This page also covers how long old data is kept (Config.Retention) and the general size limits (Config.Limits).

Part Config
Admin tablet, roles, backups, trash Config.Admin
How long data is kept Config.Retention
Size and amount limits Config.Limits

#The admin tablet

/phoneadmin (Config.Admin.Command) opens the tablet for a player who has a role. A player without a role is told so, and the attempt is logged as admin.unauthorized. Every request from the tablet is checked again on the server.

#Roles

There are three roles, from low to high:

Role ACE (default) For
moderator fxphone.mod Content: posts, comments, stories, listings, news, Darkchat, reports
admin fxphone.admin Moderator, plus accounts, users and backups
god fxphone.god Everything, including apps on and off, settings and wipes

Give roles in server.cfg:

cfgadd_ace group.admin fxphone.admin allow
add_ace group.moderator fxphone.mod allow
add_ace group.owner fxphone.god allow

A player's role is the highest ACE from Config.Admin.Ace they have. Players the framework considers admin get Config.Admin.FrameworkAdminsAre (default 'admin') when that is higher. false gives framework admins nothing. The server console counts as god. Roles are remembered for 5 seconds, so a new ACE works almost at once.

#What each role can do

Capability moderator admin god
Dashboard, lists, audit log, trash list yes yes yes
Delete and restore posts, comments, stories, listings, news; close Darkchat channels, kick members; resolve reports yes yes yes
Verify and unverify social accounts no yes yes
Ban, unban, rename, reset password, delete and restore social accounts no yes yes
Users: search, view, set a number, reset the PIN, factory reset no yes yes
Backups list no yes yes
Users: wipe no no yes
Apps on and off, runtime settings, logging switches no no yes
Take a snapshot now no no yes

What each role sees is filtered on the server. Moderators never see identifiers, phone numbers, IBANs or character names; players show as a username and a short reference. Admins also see numbers, IBANs and names. Only god sees raw identifiers. Nobody sees IP addresses on the tablet.

Every action on the tablet writes a line in the audit log, with the value before and after.

#Settings on the tablet

God admins can change some options while the server runs, without a restart:

Area Settings
Chirp, Pixl Post and bio length, accounts per player, story hours, the verified badge (mode, price, followers, days), post retention
Flame Gold price, swipe limit, accounts per player
Marketplace Posting price, daily limit, images per listing, categories, listing retention
News Jobs and grades that may publish
Darkchat Blacklisted jobs, member limit, retention
Messages Largest cash amount in a chat, retention
Invoices Whether everyone can send personal invoices, retention
Mail Retention
Phone Whether players may change the owner name
Backups and trash Days kept
Logging Each log group on or off
Apps Each app on or off for everyone

A value set on the tablet is saved in the database and wins over config.lua. After you change a setting on the tablet, editing the same option in config.lua no longer changes anything.

Other tablet sections are explained with their feature: SIM cards in SIM cards, phone shops in Phone shop.

#Console commands

Command Who What it does
fxphone:admin <id> Console Opens the tablet for player <id> with their role, or says they have none
fxphone:backup Console, god Takes a snapshot now
fxphone:number <identifier> <number> Console, fxphone.admin, framework admins Gives a character a new number
fxphone:wipe <identifier> Same Deletes every phone row of a character
fxphone:mail <target> <sender> <subject> <message> Same Sends a mail. <target> is a server id, an identifier, or -1 for everyone

The identifier is the framework's character id: citizenid on QBCore and Qbox, the ESX identifier. The last three commands are defined at the bottom of config_server.lua, so you can change or remove them there.

#Backups and trash

Snapshots. Every day at 04:30 server time fx-phone writes every fx_phone_* table to backups/<yyyy-mm-dd>/ as JSON files. Tables are read a page at a time with short pauses, so the server keeps running. Folders older than BackupDays days are deleted. A god admin can start one from the tablet, or you can run fxphone:backup in the console.

Snapshots are not a replacement for real database backups. They let you get back a deleted account or a bad night without restoring the whole database. setup/tools/restore.py turns a snapshot folder into SQL you can import.

Trash. Deleting a social account, post, comment, story, listing or news story only marks it deleted. For TrashDays days it can be restored from the tablet. After that the daily clean-up removes it.

#Config.Admin options

Option Default What it does
TrashDays 3 Days deleted content can be restored. The tablet can change it (1 to 90)
BackupDays 3 Daily snapshots kept in backups/. The tablet can change it (1 to 60)
Command 'phoneadmin' Command that opens the tablet
Ace { god = 'fxphone.god', admin = 'fxphone.admin', moderator = 'fxphone.mod' } ACE for each role
FrameworkAdminsAre 'admin' Role of framework admins: 'god', 'admin', 'moderator' or false
AuditDays 90 Days the audit log is kept, 0 forever. An audit entry in Config.Retention (or the tablet's retention.audit) overrides it

#How long data is kept (Config.Retention)

Every day at 04:00 server time a clean-up deletes rows older than the number of days below. 0 (or leaving a key out) keeps everything of that kind. The tablet can change each value at runtime.

Key Default What is deleted
messages 30 Chat messages
mail 3 Mail from scripts in the phone inbox, and mail in the trash
mailbox 30 Mail between players' addresses
listings 3 Marketplace listings
posts 90 Chirp, Pixl and TikKok (Clips) posts
invoices 90 Paid and cancelled invoices. Unpaid ones are money owed and stay until paid or cancelled
darkchat 15 Darkchat messages
notifications 7 Stored notifications
voicemail 30 Voicemail messages
snaps 30 Snaps, opened or not
news 90 News stories
stories 1 Expired Pixl stories. They are also removed every hour anyway
swipes 30 Flame swipes, so those people show up in Discover again
reports 90 Handled reports. Open ones stay
wallet 7 Wallet cards from scripts, this many days after they expired
audit not set The admin audit log. Not in the shipped list: it follows Config.Admin.AuditDays (90). Add audit = <days> to override

#Limits (Config.Limits)

Option Default What it does
MessageLength 1000 Characters in one message (Messages and Wisp)
UploadBytes 6 1024 1024 Largest upload, in bytes (6 MB)
TransferMax 1000000 Largest bank transfer, invoice and crypto amount
CashMessageMax 50000 Largest cash payment or request sent in a chat. The tablet can change it
AppPriceMax 100000 Highest App Store price a custom app from another resource may ask. Higher prices are lowered to it
VideoSeconds 30 Longest video recording, in seconds

More on uploads in Camera, on money in Bank, invoices and crypto.

#Good to know

  • The tablet says no access. The player has no role. Run fxphone:admin <id> in the console to see whether they have one, and check the add_ace lines.
  • I changed an option in config.lua and nothing happened. It was changed on the tablet before. The tablet value wins.
  • AuditDays seems to do nothing. An audit entry was added to Config.Retention, or retention.audit was changed on the tablet; either one wins. Remove it to let AuditDays decide.
  • Old unpaid invoices never go away. On purpose: retention only removes paid and cancelled invoices, because an unpaid one is money owed.
  • The fxphone:number, fxphone:wipe and fxphone:mail commands check fxphone.admin or the framework's admin check, not the tablet role. An owner with only fxphone.god also needs fxphone.admin to run them in game.