NEXO DOCSv1 · ENES
docs / scripts / nexo-phone

Nexo Phone

A complete smartphone with 43 apps, 16 minigames and 31 languages: real voice calls, social media, bank, garage and jobs.

v1.0.0StandaloneESXQBCoreQBox

What's included

A complete smartphone with 43 apps, 16 minigames and 31 languages (Arabic, Hebrew and Persian right-to-left). Each player picks their language the first time they turn the phone on. Works with Qbox, QBCore, ESX, ND_Core and standalone.

GroupApps
EssentialsPhone (real voice), Messages, Contacts, Camera, Photos, Notes, Maps, Settings, Store, Clock, Calendar, Weather, Mail, Voice memos, Calculator, Tips, Wallet
MusicRiff: catalog, playlists, likes and “play out loud”
SocialGlimpse, Squawk, Loop, Spark, CityBook, OnAir, Workly, DarkChat, N24
MoneyBank, Invoices, Coinvault (crypto), Swapr (classifieds)
HousingKeystone (buy and rent), Keyhole (doors, lights, alarm, cameras, keys)
VehiclesGarage (NPC valet, keys, remote lock), Lift (rides), Forkly (food delivery)
JobsEmergency, MDT (police), EMS, Wrench (mechanics), Services (companies), Health
Games16 minigames with city leaderboards and “challenge a friend”

Requirements

ResourceRequired?What for
oxmysqlYesStores data. Tables are created automatically
FrameworkYes (or none)qbx_core, qb-core, es_extended, ND_Core, standalone
Metadata inventoryRecommendedEach phone becomes a device with its own number: ox, qs, qb, ps or lj-inventory
Voice scriptRecommendedReal voice calls: pma-voice, saltychat, mumble-voip, toko-voip
screenshot-basicRecommendedReal camera photos (plus an upload service)
xsound / mx-surroundOptionalMusic “out loud” for nearby players
ox_libOptionalProgress bars in mechanic missions

Installation

  1. Download the resource From keymaster.fivem.net → Granted Assets.
  2. Copy the folder into resources Named nexo-phone.
    Don't rename itExports are called with exports['nexo-phone']. If you rename the folder, they stop working.
  3. Add it to server.cfg After your framework, inventory and the scripts it integrates with.
    ensure oxmysql
    ensure qbx_core            # o qb-core / es_extended / ND_Core
    ensure ox_inventory
    ensure pma-voice
    ensure screenshot-basic
    ensure nexo-phone
  4. Start the server Every table is created automatically. If your database user can't create tables, import sql/install.sql once.
  5. Create the phone item See the section below.
  6. Set up photo uploads In bridge/integrations/server/comms_upload.lua (see “Photos and voice memos”).
  7. Review the config config.lua and the files in config/. Everything is explained inside each file.

The phone item

-- ox_inventory/data/items.lua
['phone'] = {
    label = 'Phone',
    weight = 190,
    stack = false,
    close = true,
    server = { export = 'nexo-phone.usePhone' },
},
  • ESX without ox_inventory: add phone to the items table. The phone is then tied to the character.
  • No item: set Config.RequireItem = false and players open it with the key (F1 by default) or the /phone command.

Phones, numbers and security

ModeHow it works
ItemWith a metadata inventory, each phone item is a device with a serial, its own number and its own data. Whoever holds it can use it; if it has a passcode, they need to know it.
IdentityOne phone per character.

Config.PhoneMode = 'auto' picks item when your inventory has metadata, otherwise identity. Data (contacts, chats, photos, social accounts) belongs to the number, so a phone keeps it when it changes hands.

The first time a phone is used, the setup runs: language → number → face unlock → passcode → location → theme.

  • Face unlock only recognises whoever set it up.
  • Passcodes are stored hashed (bcrypt).
  • After 5 failed attempts the phone locks for 60 s, and the lockout doubles each time (max 15 min).
  • Number format in Config.Number: Pattern = '555#######' (# = random digit), and AllowCustom lets players choose their own.

Configuration

FileWhat it controls
config.luaFramework, inventory, item, phone mode, key and command, number format, security, default theme, prop and animation
config/comms.luaCalls (voice, hidden number, service numbers like 911), messages, camera and uploads, gallery, map
config/media.luaRiff songs and “out loud”, voice memos, mail domain, calendar, clock and weather
config/social.luaSocial apps: usernames, banned words, limits, N24 reporters, Lift prices, OnAir Sparks, Workly bosses, DarkChat
config/money.luaBank and fees, billing jobs, Coinvault, Swapr, Wallet documents, Keystone properties and Keyhole
config/jobs.luaDispatch, police/EMS/mechanics and their grades, penal code, treatments, missions, companies, Forkly restaurants, Health
config/garage.luaGarages, impound, valet fee and NPC driver, shared keys, remote range
config/games.luaLeaderboard size, retention and anti-cheat limits
config.lua optionDefaultWhat for
Config.Framework / Config.Inventory'auto'Detected on start. Set them if detection is wrong
Config.PhoneMode'auto''item' or 'identity'
Config.Item / Config.RequireItem'phone' / trueItem needed to open it
Config.OpenKey / Config.OpenCommand'F1' / 'phone'Key (rebindable in GTA settings) and command
Config.WalkWhileOpentrueWalk with the phone open
Config.LockOnClosetrueLock when closed
Config.Clock'game'Game time or 'real'
Config.DefaultsTheme = 'auto'Theme (light by day, dark by night), accent and wallpaper
Config.VehicleImagesFiveM galleryCar pictures in the Garage; use your own folder for add-on cars
Config.CanOpenfunctionBlocks opening it (dead, cuffed, paused…). Edit it freely
Config.DebugfalseDetailed console logs

Integrations

They're detected on start (check the server console). Each integration lives in an open file in bridge/ so you can adapt it to custom scripts.

CategorySupportedFile
Frameworkqbx_core, qb-core, es_extended, ND_Core, standalonebridge/framework/*
Inventoryox_inventory, qs-inventory, qb / ps / lj-inventory, nonebridge/inventory/*
Voice (calls)pma-voice, saltychat, mumble-voip, toko-voip…/comms_voice.lua
Photo uploadFivemanage, Discord webhook, customserver/comms_upload.lua
Music out loudxsound, mx-surroundserver/media_sound.lua
Weather / timeRenewed-Weathersync, qb-weathersync, cd_easytime, vSync, nativoclient/media_weather.lua
Dispatchps-dispatch, cd_dispatch, qs-dispatch, core_dispatch (the phone's own always works)server/jobs_dispatch.lua
DutyQBCore/Qbox duty, ESX jobsserver/jobs_duty.lua
BillingokokBilling, esx_billing, qb-phone / jim-paymentsserver/money_billing.lua
Society accountsRenewed-Banking, okokBanking, qb-banking, qb-management, esx_addonaccountserver/money_accounts.lua
Housing / doorsps-housing, qb-houses, qs-housing, esx_property, bcs_housing, ox_doorlockserver/money_housing.lua
Vehiclesplayer_vehicles, owned_vehicles, nd_vehicles, jg-advancedgarages, cd_garageserver/garage_vehicles.lua
Keysqbx_vehiclekeys, qb-vehiclekeys, wasabi_carlock, MrNewbVehicleKeys, cd_garage, jaksamserver/garage_keys.lua
Fuelox_fuel, LegacyFuel, cdn-fuel, ps-fuel, lj-fuel, lc_fuel, nativoclient/*
Jailqb-prison, esx-qalle-jail, rcore_prisonserver/jobs_framework.lua

Photos and voice memos

The camera, Glimpse, Swapr and voice memos need somewhere to store files. Open bridge/integrations/server/comms_upload.lua, pick the service and add your key.

local Service = 'fivemanage'
local Token = 'TU_TOKEN_DE_FIVEMANAGE'
Your key never leaves the serverWith UploadMode = 'server' (default) the screenshot goes to your server and is uploaded from there. Only URLs from AllowedHosts are saved; if you use another service, add its domain.

You need screenshot-basic running. In the camera: ENTER photo, ↑ selfie, BACKSPACE back.

Calls and messages

  • Service numbers (Config.Comms.Services): calling 911, 912… rings every on-duty player of those jobs and the first one to answer takes it.
  • Hidden caller ID: dial #31# before the number.
  • Airplane mode and Do not disturb (everyone, favourites or nobody): the call shows as missed.
  • Blocked numbers can't call or text you.
  • With RegisterOnSpawn = true the phone registers when the character loads: you get calls without having opened it.
  • Messages with text, photo, location or a game challenge. Offline players get them when they come back.
Config.Comms.Services = {
    { number = '911', label = 'Police', jobs = { 'police', 'sheriff' } },
    { number = '912', label = 'EMS', jobs = { 'ambulance' } },
    { number = '913', label = 'Mechanic', jobs = { 'mechanic' } },
    { number = '914', label = 'Taxi', jobs = { 'taxi' } },
}

Music (Riff)

The catalog is Config.Media.Music.Songs. Each song needs a numeric id that is unique and never changes (likes and playlists store it).

{ id = 1, title = 'Neon Avenue', artist = 'Velvet Static', album = 'Afterglow', dur = 214,
  a = '#ff6ba8', b = '#6f43d6', genre = 'pop', url = 'https://.../neon-avenue.mp3' },
The URL must be an audio fileA direct https link (mp3, ogg, m4a or webm). YouTube or Spotify links don't work. Without url, the song is listed but plays silently.

Play out loud is heard by nearby players. It needs xsound or mx-surround.

Social apps

  • Accounts belong to the number, not the character.
  • BannedWords + BannedWordsMode: 'censor' replaces the word with **** and 'block' rejects the text (posts, comments, chats, reviews, articles…).
  • RequireAccount: players pick a username the first time; when off, it's created from their name.
  • Lift: price is BaseFare + km × PerKm; it's charged at the end and the driver gets it minus PlatformFee.
  • OnAir: viewers buy Sparks with bank money and donate them; streamers cash out at CashoutRate.
  • Workly: only bosses (grade ≥ BossGrades) post jobs; applications go to on-duty bosses.
  • DarkChat: aliases, 6-character invite codes and self-deleting messages. It can require an item.
  • N24: reporters (News.Jobs) write articles and breaking news is pushed to every phone.

Money and housing

All money moves on the server: the UI only sends what the player asked for, and the server checks every amount, target and owner again.

AppKey points
BankTransfers to a phone number, an NX12345678 account or an identifier. Offline players are credited anyway. History, card freeze and savings.
InvoicesJobs in Invoices.Jobs bill by number; money goes to the society or the employee. Also lists okokBilling, esx_billing and qb-phone invoices.
CoinvaultOne shared market that moves prices every TickSeconds, with price alerts and transfers.
SwaprClassifieds per number with photos, search, chats and offers. They expire after ExpireDays.
WalletID, licences, work badge and health card from the framework. “Show” to a nearby player.
Keystone / KeyholeBuy with a down payment and mortgage, or rent weekly. Doors with ox_doorlock, PIN alarm, cameras and guest or tenant keys.

Garage and valet

  1. The player orders the car It must be in a garage (not out or impounded). Valet.Fee is charged.
  2. It spawns far away, out of sight With its saved mods, fuel and damage.
  3. An NPC driver brings it It follows the player if they move, parks, unlocks the car and walks away. The app shows progress and ETA.
  4. If something fails If it doesn't spawn within SpawnTimeout the fee is refunded; past DeliveryTimeout, the car is moved to the nearest road.

Also: share keys with contacts, lock and honk remotely (within RemoteRange) and release from impound paying ImpoundRelease.Fee. If your garage script uses another table, edit SCHEMA in garage_vehicles.lua.

Jobs

AppWhat it does
EmergencyCitizens alert police, EMS or roadside assistance with their position. They see the unit approaching live.
MDTPeople and plate search, priors, warrants, BOLOs, reports with penal code charges (fines and jail) and units.
EMSMedical records, reports with injuries and treatments (billed to the patient) and hospital beds.
WrenchWork orders, real vehicle diagnosis and NPC missions (tow, impound, roadside repair, parts) validated on the server.
ServicesCompanies open by on-duty staff, duty toggle, hiring and customer chat.
ForklyFood orders charged on the server, player or NPC couriers.
HealthHealth, armour, hunger, thirst, stress, steps and medical ID.
Minimum gradesEvery MDT feature has a minimum grade in Config.Jobs.Police.MinGrade. Calls, beds and active missions live in memory and reset on restart.

Administration

Give the nexo.admin ACE to your moderators. They can delete any post, clip, ad, review or article, end streams and burn DarkChat channels from inside the apps.

add_ace group.admin nexo.admin allow

Exports for other scripts

Connect your scripts to the phone. All of them are server-side except the Client tab.

exports['nexo-phone']:Notify(source, { app = 'messages', title = 'Title', text = 'Text' })
exports['nexo-phone']:GetPhoneNumber(source)          -- número en uso
exports['nexo-phone']:GetSourceByNumber(number)
exports['nexo-phone']:SendMessage(fromNumber, toNumber, text)
exports['nexo-phone']:SendLocation(fromNumber, toNumber, x, y, label)
exports['nexo-phone']:IsInCall(source)
exports['nexo-phone']:EndCall(source)
Server eventWhen it fires
nexo:comms:messageSentA message is sent
nexo:comms:callStarted / callEndedA call starts or ends
nexo:comms:photoTakenA photo is taken
nexo-phone:bankTransferBank transfer
nexo-phone:invoicePaidAn invoice is paid
nexo-phone:houseAlarmA house alarm goes off
nexo-phone:dispatch:createdA dispatch call is created
nexo-phone:mdt:reportAn MDT report is saved

Performance

  • ~0.00 ms at idle: no client loops while the phone is closed, except short ones on demand (a ride, a delivery, a mission, an alarm).
  • The UI only loads the base when opened; each app and language downloads the first time it's used.
  • Server: prepared queries on indexed tables, pagination and caches, and automatic cleanup of old data.
  • Every callback is rate-limited and validates its input; money only moves on the server.

Updating

Replace the folder and restart. New tables and columns are added automatically (the nexo_migrations table tracks what's installed).

Keep your configKeep your config/ files and comms_upload.lua and compare them with the new ones to add new options.

Troubleshooting

ProblemFix
“You don't have a phone”Create the phone item or set Config.RequireItem = false
It opens but setting the number failsCheck the console for oxmysql errors; the DB user needs CREATE/ALTER (or import sql/install.sql)
No voice in callsStart your voice script before nexo-phone and check config/comms.lua → Voice
Photos aren't savedSet up comms_upload.lua, start screenshot-basic and add the domain to AllowedHosts
Cars missing in the GarageCheck the “garage: vehicles table…” console line; custom garages may need garage_vehicles.lua adjusted
Wrong framework detectedSet Config.Framework instead of 'auto'

Set Config.Debug = true for detailed logs.

FAQ

What does it work with?

Qbox, QBCore, ESX, ND_Core or no framework. It detects the most used inventories (ox, qs, qb, ps, lj), voice (pma-voice, saltychat, mumble, toko), dispatch, banking, housing and garages on its own.

Does every player get their own number?

Yes. With a metadata inventory every phone item is a device with its own number and passcode. Without one, there's one phone per character.

How are photos saved?

With screenshot-basic and an upload service: Fivemanage, a Discord webhook or your own endpoint. The key is never sent to players.

Is the code encrypted?

The core is protected with Cfx.re escrow. Config, translations and integration points stay open.

Do I get updates?

Yes, for free. New versions appear in your Keymaster and we announce them on Discord.

What if something doesn't work?

Open a ticket on our Discord with the console error and we'll help you.