Configuration
Configuration
The whole shared/config.lua file is editable (outside escrow).
Open command
Config.Command = "mechtablet" -- rename it, or set false to disable the command
Language
Config.Locale = "pt" -- file at locales/<locale>.lua (pt, en, ...)
Config.Mail = { domain = "phyre.mail" } -- each character gets firstname.lastname@domain
Tablet prop (model held in hand while open)
Config.TabletProp = "prop_cs_tablet"
Appearance / branding
Config.UI = {
appearance = "auto", -- "auto" (follows game time) | "dark" | "light"
accent = "#ff7a00", -- accent color across the whole UI
deviceName = "Phyre Pad", -- name on the lock screen and Settings → About
showCarrier = true,
carrier = "PHYRE", -- carrier label on the status bar
clock24h = true, -- true = 24h | false = 12h AM/PM
defaultWallpaper = "wallpapers/iridescent.svg",
wallpapers = { ... }, -- wallpapers selectable in Settings
}
The bundled wallpapers/*.svg are self-contained and never break. You can add external image URLs (they must allow hotlinking).
Open with an inventory item
Phyre Tablet auto-registers a usable tablet item, detecting your inventory. On by default:
Config.UsableItem = {
enabled = true, -- false = don't register any item
name = "tablet", -- item name (must exist in your inventory)
consume = false, -- false = reusable | true = removed on use
}
Supported (auto-detected, no config): ox_inventory · ph-inventory · qs-inventory · qb-inventory · esx. On boot the console prints which one it wired, e.g. [ph-tablet] usable item "tablet" wired to qb-core/qb-inventory.
The tablet only wires the "use → open" behaviour. The item itself (name, image, weight) must exist in your inventory. Add it:
qb-inventory / qb-core, qb-core/shared/items.lua:
tablet = {
name = 'tablet',
label = 'Tablet',
weight = 500,
type = 'item',
image = 'tablet.png',
unique = true, -- REQUIRED: tablets must not stack
useable = true,
shouldClose = true,
combinable = nil,
description = 'A tablet',
},
esx, insert into the items table:
INSERT INTO items (name, label, weight, rare, can_remove) VALUES ('tablet', 'Tablet', 1, 0, 1);
ox_inventory, ox_inventory/data/items.lua. Special case: ox only calls the handler if the item declares the ph-tablet export:
['tablet'] = {
label = 'Tablet',
weight = 500,
stack = false,
close = true,
server = { export = 'ph-tablet.tablet' }, -- REQUIRED for ox
},
(ph-tablet.tablet = <resource>.<name>; if you change Config.UsableItem.name, change it here too.)
qs-inventory, add the item through the qs-inventory config/DB (qb-compatible format). No extra ph-tablet config.
ph-inventory, add a tablet item (Item Manager /itemmanager or shared/items.lua) with usable = true. The wiring uses the ph-inventory:server:onItemUsed event.
Put the tablet.png image in your inventory's image folder.
Photos & videos: where they're stored
The camera captures the screen internally. The result is saved one of two ways, chosen by Config.Capture.uploadProvider:
| Value | Behaviour | |---|---| | "none" | Stores the image as base64 directly in the database (no external service) | | "discord" | Sends via Discord webhook and stores the URL | | "fivemanage" | FiveManage API | | "imgbb" | ImgBB API | | "imgur" | Imgur API (Client-ID) | | "custom" | Your own API, see Server/Custom/upload/custom.lua |
Fill credentials in Config.Capture.upload (only the fields the chosen provider uses). FiveManage/ImgBB/Imgur: put the key in apiKey, leave endpoint empty. Discord: paste the webhook in endpoint.
Recommendation: for production use an upload service (discord/fivemanage/…) instead of
"none". Storing many base64 images in the database grows it fast.
Other capture options: encoding (webp/jpg/png), quality, resolution (maxWidth/maxHeight), and for video videoFps, videoMaxDurationMs, videoMaxFrames.
Map: tiles & pins
- Tiles: run
scripts/fetch-atlas-tiles.ps1once to download tiles intohtml/dist/tiles/. Required for the map to render. - Pin categories:
Config.MapCategories(label, color, icon). - Server-fixed pins:
Config.MapLocations: locations shown to everyone (garages, shops, PD, hospital…). Edit freely.
Web apps (websites as icons)
Config.WebApps adds home-screen icons that open a website inside an iframe (weather, calculator, radio, games, etc.). Each entry:
{ id = "weather", name = "Weather", url = "https://wttr.in/", icon = "..." }
Many big sites (Google, YouTube, Facebook…) block being shown inside an iframe (
X-Frame-Options/CSP) and show a blank icon. That's the site's decision, not the resource. The default URLs were verified as compatible.