Jixryo Phone
The suite's own foldable phone. A cover screen folded and an inner screen open, lock and home screens, a control centre, notifications, everyday apps, a real battery on every phone, and apps any script can add.
Version 0.1.0 Updated See it on its script page
On this page
Jixryo Phone is the suite's own foldable phone, in the same look as the tablet. This is phase 1: the device and its everyday apps. Calls, messages, FaceTime, the camera and the city apps come in their own phases, and lb-phone stays the server's phone for those until the switch-over. There will never be two phones for good.
What players get
- The device. The
jixryo_phoneitem brings it out low on the right of the screen. Folded, it shows the cover screen in one hand; T opens it to the inner screen, in both hands with its own pose. You can walk with it out: the page has the mouse, the game keeps the movement keys (looking around, attacking and the pause menu wait), and typing in a field stops the walking until the field lets go, with a typing pose. It goes away on Esc after closing what is on top, when you die, ragdoll or swim, when the phone leaves your pockets, when its battery runs flat, and when the resource stops. lb-phone and lb-tablet go away when it comes out. - No name on it. The lock screen shows whose phone it is; About shows "Phone" and its serial.
- The screens. A lock screen (on by default, and it locks itself after the chosen time untouched), a home screen (app icons with a dock and search, or tiles; widgets; hold to arrange), a status bar (the city's time, signal, the mode, an alarm on, the battery), a control centre (battery, network, ring, silent, do not disturb or airplane, low power, sounds, lock now, fold, brightness), a notification centre (U, or the time on the status bar), banners, battery warnings at 20% and 10%, and the empty battery.
- Apps. Settings (Customize, Display, menu sounds, notifications per app, keys, battery, about), Customize (home look, icons, widget, the bottom, apps solid or glass, clock, wallpaper), Clock (alarms on the city's clock, a timer and a stopwatch on real time), Weather (the game's weather now and next, in °F and mph), Maps (the city's own map: you, your saved places, drop a pin, Set GPS puts the game's waypoint there, save a place), Notes, Calculator, All apps and the Store (the apps other scripts add).
- A real battery, on each phone. Its own charge and serial are on the item. The serial shows on the inventory card; the battery line is registered for the card too, but the inventory screen does not show registered lines yet. It drains while the screen is on (1% a minute; low power drains at 0.6 of that) and a little in standby (0.05% a minute). It charges in a vehicle with the engine running (1.5% a minute), at a charger (3% a minute: every Jixryo Computers desk computer, plus spots in
config.lua), or from a power bank plugged in from Settings > Battery (2% a minute; a full bank gives one and a half charges; banks refill at a charger, and a flat one hands over to the next in your pockets). At 0% it will not turn on until it is charged. The server keeps all of it. - Notifications. A banner while the phone is out, the HUD while it is away unless the sender asked for quiet or you are in do not disturb or airplane mode, badges on the apps, muting per app, and tapping one opens its app on the page it names. The last 50 are kept.
- Signal. Full bars in Los Santos, fewer the further out you are.
What staff get
- Everything is the server's. Settings, notes, alarms and saved places live in the database per character, cleaned on every save. A character keeps up to 50 notes, 20 alarms and 30 places.
- The battery is the server's too, through Jixryo Core's battery module: each phone's charge sits on its own item, so a phone handed to someone else keeps its charge and is no longer yours to drain.
- Apps from other scripts use the same
AddAppcall as the tablet, so one page serves both devices. Hooks handed over through the export run. - Not here yet. Calls, messages, FaceTime, the camera and the city apps are later phases.
Install
What it replaces. Nothing yet. lb-phone stays the server's phone for calls and messages until the switch-over; this phone sits beside it and puts it away when it comes out.
Order. Start it after Jixryo Core 1.1.0 or later (the battery module is there) and ox_inventory. It also depends on ox_lib, oxmysql and qbx_core.
server.cfg ensure jixryo_core ensure jixryo_phoneItems.
jixryo_phoneandpower_bankare in the Jixryo ox_inventory fork (itsdata/items/jackson.lua, with the picturesweb/images/jixryo_phone.pngandpower_bank.png). Upload the fork with it.One owner for the phone item. Jixryo Tablet 1.1.0 also registers
jixryo_phoneas a useable item (it folds into a phone form). Both resources claim the same item, so run only one of them on it: with this phone installed, clearConfig.phoneItemin the tablet's config[inferred: qbx_core keeps one handler per item name].Database. The tables
jixryo_phone_settings,jixryo_phone_notes,jixryo_phone_alarmsandjixryo_phone_placesare made on the first start, as one Jixryo Core migration step.Try it. Give yourself a phone and a power bank:
bash /giveitem <id> jixryo_phone 1 /giveitem <id> power_bank 1Optional.
Config.keybrings it out with a key while you carry one; leave it empty while lb-phone has its own key.Restart the whole server, not just the resource.
How other scripts' calls behave
- It answers as itself only. Its exports live under
jixryo_phone.AddApptakes the same table as the tablet's, so a page written for the tablet works here with one more call. - Other devices. When it comes out it asks lb-phone and lb-tablet whether they are open (
IsOpen) and puts them away (ToggleOpen), whileConfig.closeOtherDevicesis on. - Chargers from Jixryo Computers. With it running, every desk computer's monitor position is read from its
jixryo_comp_stationstable as a charger, read only, on start and every 5 minutes. - It uses Jixryo Core's battery, HUD (notifications and sounds), player, validation, rate limit and database modules; ox_inventory's slots and item search, and its item card metadata for the battery line; and qbx_core's useable item.
- Added apps go away when their resource stops. Job lists only decide what shows; an app's own server checks everything it does.
- On the tablet today, not the phone. TrailCam, Cameras, Techno Unlimited and the bank app add themselves to the tablet; each needs this one call to be on the phone too.
Its own API
Client exports:
| Export | What it does |
|---|---|
AddApp({ id, name, icon, ui, jobs?, forms?, onOpen?, onClose? }) | Adds an app to the Store. id is letters, digits, _ and - (up to 32), name up to 24 characters, ui and icon pages served from a resource (https://cfx-nui-<resource>/...). forms lists the layouts the page has, phone and tablet; without it the app is tablet only and opens the phone up to the inner screen. The phone's own app ids are refused. Returns true or false. |
RemoveApp(id) | Takes an app off; only the resource that added it. |
SendAppMessage(id, payload) | Pushes into the app's page as a window message; only the resource that added it, and only while the app is on screen. |
Notify({ app, title?, message, quiet?, route? }) | A notification on this player's phone. |
Open(appId?, { route?, form?, slot? }) | Brings the phone out, optionally straight onto an app and a page inside it. form is cover or inner; without it, the form it was last put away in. slot names the phone to use. |
Close(), IsOpen() | Puts it away; whether it is out. |
GetForm() | cover or inner while it is out, else nothing. |
GetCurrentApp() | The id of the app on screen. |
SoundsOn() | Whether this character has menu sounds on (off in silent and do not disturb too); apps play theirs only then. |
Server export: Notify(src, { app, title?, message, icon?, quiet?, route? }), true when the player is in the city.
Local events (client): jixryo_phone:client:opened (form), jixryo_phone:client:closed, jixryo_phone:client:form (form), jixryo_phone:client:appOpened (id), jixryo_phone:client:appClosed (id).
An added app's page runs in the phone's app frame and speaks the tablet's messages: #jxForm=phone on its address, form when the phone opens or folds, route and resume, and the page's own home, close, escape, notify, badge and typing. Keep the top 2.4 rem and the bottom 1.3 rem of the screen clear. A route is letters, digits, _, - and /, up to 48 characters (for example orders/1042).
Commands and keybinds
There are no commands. The keys work while the phone is out and are ignored while a text field has them.
| Key | What it does |
|---|---|
| Esc | Closes what is on top (a warning, the control centre, notifications, search, editing), then puts the phone away |
| T | Opens it up, or folds it |
| Y | Home |
| U | Notifications |
| Backspace | Back one page (an app's own page first, then home) |
| Enter | Select |
| Calculator | Digits, + - * /, =, Delete |
| Using the item | Brings it out; using it again puts it away |
Config.key (off by default) | A keybind "Open the phone" players rebind in GTA's key settings under FiveM |
Configuration
config.lua:
| Key | Default | What it does |
|---|---|---|
item | 'jixryo_phone' | The phone item; each phone keeps its own charge and serial |
key | '' | A key that brings it out; empty is the item only |
keys | fold T, home Y, notifications U, select ENTER, back BACKSPACE | The keys the page listens to; Esc always puts it away |
hold.cover | prop_npc_phone_02 in the right hand, the phone reading pose | The phone folded, one hand |
hold.inner | the same prop, the standing text pose | The phone open, both hands |
hold.typing | the phone pressing pose | While a text field has the keys |
hold.walk | true | Walking with it out |
closeOtherDevices | true | Put lb-phone and lb-tablet away when it comes out |
hudNotifications | true | Notifications that arrive while it is away also show on the HUD |
battery.drain | on 1.0, standby 0.05 | Percent a minute with the screen on, and in standby |
battery.lowPower | 0.6 | How much of the drain low power uses |
battery.rate | vehicle 1.5, charger 3.0, powerbank 2.0 | Percent a minute from each source |
battery.chargers | none | Charger spots on the map |
battery.chargerRange | 2.5 | How close to a charger |
battery.computerDesks | true | Every Jixryo Computers desk computer is a charger |
battery.powerBank | 'power_bank' | The power bank item |
signal | centre in Los Santos, full 3500 m, none 9000 m | Signal bars by distance from the city |
notes | max 50, title 48, body 4000 | Notes per character and their lengths |
alarms | max 20, label 40 | Alarms per character |
places | max 30, label 32 | Saved places per character |
temperature | a base per weather type (clear 72 °F, rain 58 °F, snow 30 °F and so on), night -8 | What Weather shows |
Security
- Everything the page sends is checked on the server, and a character only ever reads and changes their own rows: settings, notes, alarms and places are keyed by citizen id.
- Settings. Only known values survive and anything wrong falls back to the default: one mode at a time (airplane, then do not disturb, then silent), brightness 20 to 100, glass 10 to 80, ring volume 0 to 100, lists from the config, app ids cleaned, a dock of 4, up to 80 apps, 40 tiles, 40 installed apps and 60 per-app notification switches.
- Notes. Line breaks are kept, other control characters dropped, the text must be valid UTF-8 and is cut at 4000 characters; the title comes from the first line when none is given.
- Alarms and places. A time is
HH:MMonly, days 0 to 6 each once; a place needs a name, coordinates within the map and an icon from the list (pin, home, briefcase, star, car), else a pin. - The battery. Turning on uses the phone in the slot you used, or the first phone on you; a slot that is not a phone falls back. A phone moved to another slot is the same phone; given away, it is no longer yours to drain; another phone put in the same slot keeps its own charge. A flat phone refuses to turn on until charged, and a power bank must be on you with charge.
- Rate limits on every call (opening, settings, notes, alarms, places and plugging in), with a lock on each kind of save.
- The client side.
AddApptakes only pages served from a resource and never the phone's own ids;RemoveAppandSendAppMessagework only for the resource that added the app; the page's own apps notify only as themselves and added apps only as theirs; an alarm rings only with a phone with charge on you; a waypoint must be on the map. - The Notify export reaches only a player who is in the city.
Tests
Two suites in dev-tools/luarun/tests, both run on 2026-10-31.
| Suite | Result | What it covers |
|---|---|---|
jixryo_phone.lua | 20 passed, 0 failed | The server on a real database with Jixryo Core's real validate, db and battery modules: the tables; the item and the slot; turning on, the serial and the inventory's battery line; draining at 1% a minute and in standby; low power; running flat and refusing to turn on; charging in a running vehicle, at a charger (and the desk computers from Jixryo Computers' table) and from power banks, one handing over to the next; a phone moved, given away, or swapped in a slot; settings cleaned and kept; notes, alarms and places with their limits and ownership; the Notify export. |
jixryo_phone.client.lua | 14 passed, 0 failed | A stand-in player's game against the real server: the item bringing it out with its status, settings, pose and walking, lb-phone put away; using it again; Esc and folding; typing; going down or losing the phone; the battery reaching the page and the empty battery; a flat phone; no phone on you; added apps (jobs, only their own resource, hooks as function references); notifications (banner, HUD, muted, do not disturb); the page's callbacks; alarms on the city clock. |
cd dev-tools/luarun
node run.mjs ../../jixryo_scripts/jixryo_phone tests/jixryo_phone.lua
node run.mjs ../../jixryo_scripts/jixryo_phone tests/jixryo_phone.client.luaThe README also records that the built page was driven as FiveM runs it (dev-tools/nui/cdp-game.mjs): open, lock, unlock, home, Notes, the control centre saving settings, a banner, folding, the low battery and Esc putting it away, with every callback it posts matching the Lua.
Check it in game
- Use the phone item: it comes out folded on the lock screen with your name and the city's time. Click to unlock.
- Walk with it out. Type in Notes: you stop walking while the field has the keys.
- T opens it up in both hands; T folds it.
- Settings > Customize: change the wallpaper, put the phone away and bring it out. It kept it.
- Notes: write one, put the phone away and bring it out. It is there, and after a relog too.
- Clock: set an alarm a few city minutes ahead. It rings, as a banner with the phone out or on the HUD with it away.
- Maps: you are where you stand. Tap the map and Set GPS: the waypoint is on your map.
- Battery: sit in a car with the engine running. Settings > Battery says it is charging in the car.
- Give yourself a power bank and plug it in from Settings > Battery: the phone charges from it and the bank's charge goes down in your inventory.
- Let it run flat: the empty battery shows, then it puts itself away and will not turn on until charged.