This page covers what nx_computer needs beyond the
generic installation guide:
its dependency set, the inventory items, admin access, the banking
backend, the files you can edit to fit your server, the MDT and its
dispatch, the Employees app, the Newsroom, and mail addresses.
Dependencies#
- oxmysqlRequired
Database access. All tables are created automatically at runtime.
- ox_libRequired
Callbacks, UI helpers, and locale glue.
- ox_targetRequired
Opening and picking up the laptop, pairing the monitor and projector.
- ox_inventoryRequired
The laptop, projector, camera, polaroid, and darknet access items.
- nx-3dRequired
Separate download from NX Creative, included with your purchase. Renders the OS onto the laptop screen in the world.
- nx_realbankingOptional
Optional. Richer Banking backend with per-character accounts, company accounts and company billing, the MDT financial lens, and tickets as fines. See the banking backend section below.
- screencaptureOptional
Optional. Required for the in-world camera item and for MDT bodycam clips.
- pma-voiceOptional
Optional. Carries voice in the Meetings app. Without it, meetings run with video only.
- lb-phoneOptional
Optional. Enables the phone bridge (laptop notifications on the phone) and phone photo sync. Both switch on automatically when it is running.
- nx_phoneOptional
Optional. Shares accounts and mail addresses with the laptop, shows Newsroom stories in its Bulletin app, puts 911 calls on the MDT dispatch board, adds an MDT app and phone tools for officers, delivers tickets and pay notifications, and carries the MDT tip and appeal lines.
- nx_employeemanagementOptional
Optional. Runs alongside the Employees app on the same data. Use 2.2.0 or newer.
- nx_hudOptional
Optional. Draws the in-car MDT (the Dash) in its own glass. Without it, nx_computer draws its own.
- A billing scriptOptional
Optional. Turns MDT tickets into bills: nx_realbanking, okokBilling, esx_billing, qb-phone, jim-payments, codem-billing or Renewed-Banking. Without one, tickets are paid at the station.
- nx_writeOptional
Optional. Lets players draw on polaroids.
Start order#
nx-3d must start before nx_computer, and both after the ox stack:
ensure ox_libensure oxmysqlensure ox_inventoryensure ox_targetensure nx-3densure nx_computerDatabase: no import required#
Every table is created and updated automatically the first time the
resource starts. Each server module runs an idempotent schema check on
boot and stamps a version marker into nx_computer_meta. The bundled
nx_computer.sql is a reference index of the tables for DBAs, not an
import script.
The database user configured in oxmysql must be allowed to
CREATE TABLE and ALTER TABLE.
Inventory items#
Copy the item icons from inventory-images/ (laptop.png, camera.png,
polaroid.png, projector.png, usb.png) into ox_inventory/web/images/.
Skip usb.png if your server already has a usb item with its own icon.
Add these to ox_inventory/data/items.lua. The item names must match
their keys in config.lua (Config.LaptopItem, Config.Projector.Item,
Config.Camera.ItemName, Config.Camera.Polaroid.ItemName,
Config.Darknet.AccessItem). QB and QBox
servers running ox_inventory register items in the same file, so the
snippets apply on every framework.
-- Required: the laptop itself (Config.LaptopItem = 'laptop').["laptop"] = { label = "Laptop", weight = 1000, stack = false, -- each laptop is its own computer; never stack close = true, description = "A personal computer. Invest, message, browse, and more.", client = { event = 'nx_computer:client:useLaptop' }},-- Optional: ceiling-mounted projector, a third display-- (Config.Projector.Item = 'projector').["projector"] = { label = "Projector", weight = 2000, stack = true, close = true, description = "Mounts to a ceiling and casts your laptop onto the wall.", client = { event = 'nx_computer:client:useProjector' }},-- Optional: in-world camera (Config.Camera.ItemName = 'camera').-- Uses an export, not an event. Requires the screencapture resource.["camera"] = { label = "Camera", weight = 500, stack = false, close = true, description = "Take photos that sync to your laptop's Photos app.", client = { export = 'nx_computer.useCamera' }},-- Optional: printed polaroid (Config.Camera.Polaroid.ItemName = 'polaroid').-- Minted by the camera's print mode. Each polaroid carries its own photo,-- so never stack. Using it holds the photo up; "Place" puts it on a wall-- or table.["polaroid"] = { label = "Polaroid", weight = 10, stack = false, close = true, description = "A printed photo. Use to hold it up; place on a surface to display.", client = { export = 'nx_computer.usePolaroid' }},-- Optional: film, consumed per print only when-- Config.Camera.Polaroid.RequireFilm = true (default false).["polaroid_film"] = { label = "Polaroid Film", weight = 5, stack = true, close = true, description = "A cartridge of instant film for the camera's polaroid printer.",},Darknet access item. The Darknet app requires the player to carry
Config.Darknet.AccessItem (default 'usb'). It is a presence check
only, so no client hook is needed. If your server has no usb item,
register one, point AccessItem at an existing item, or set
Config.Darknet.Enabled = false.
First configuration#
Confirm two settings in config.lua before first start:
Config.Framework:'esx','qbcore', or'qbox'('qbx'is accepted as an alias). The framework core must start beforenx_computer.Config.Locale: one ofen,fi,de,fr,pt-br,es,tr,nl,it,pl. Unknown values fall back to English.
Both files survive updates: config.lua and config_server.lua are
excluded from escrow.
Image uploads (Photos, avatars, site images). Uploads relay through
FiveManage using a server-side token. Create an Images token in the
FiveManage dashboard and set Config.Media.FiveManageToken in
config_server.lua. Leave it empty to keep uploads disabled; the rest
of the laptop works regardless. Keep the token in config_server.lua
only. It is a secret, and config.lua downloads to every client.
Admin access (ACE)#
The admin Console app and admin actions (remote PIN reset, device wipe
and lock, policy overrides) require the nx_computer.admin ACE:
# Grant to your admin group...add_ace group.admin nx_computer.admin allow# ...or to a specific person:add_principal identifier.license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx group.adminThe broad command ACE is not accepted by default because it is often
granted to non-admin console principals. Set
Config.AllowCommandAceAdmin = true only if you intentionally want
command-ACE holders to be nx_computer admins.
Banking backend#
Config.Banking.Backend selects how the Banking app moves money:
'auto'(default): usenx_realbankingautomatically when that resource is started, otherwise fall back to native framework banking.'framework': your framework's own cash and bank accounts. Transfers are addressed by@handle. No external dependency.'realbanking': bridge tonx_realbanking(per-character accounts, invoices, credit). Requiresnx_realbankingto be started; without it the app shows a clean "not configured" state and the boot self-check warns.
Servers on a custom framework (Config.Framework = 'custom') supply a
money adapter via Config.Banking.Adapter instead. See
Configuration for the adapter shape.
With nx_realbanking, Banking also shows company accounts:
- Society accounts (nx_realbanking 1.9.0 or newer). A boss, or a grade with the Society funds grant in the Employees app, sees the company's account next to their own, with its balance, and can transfer between it and their own accounts.
- Company billing (nx_realbanking 1.11.0 or newer). Send an invoice to a person or to a company, as yourself or as your company. The app offers only what the player is allowed to bill. Company accounts show under their account number, and a boss sees what the company owes. The Invoices and Credit tabs hide when nx_realbanking has them turned off.
Open files for server integration#
Every place where nx_computer touches your framework or another resource stays readable and editable in the escrowed build. Edit these to fit a forked core, renamed tables, or a different phone, bank or garage, without waiting for an update.
| File | What it covers |
|---|---|
bridge/server/framework.lua | Every ESX, QBCore and Qbox call on the server: players, identifiers, names, jobs and grades, duty, cash and bank, the admin check, and the player loaded, logout and job change events |
bridge/server/characters.lua | Reads of the character tables (MDT person search and person sheet, offline job members), phone number sources (PhoneSources, where you add your phone's table), and owned-vehicle reads and writes |
bridge/client/framework.lua | The local player's job and duty, and the job change events |
client/money.lua | Framework money change events that refresh the Banking app |
server/placer_gate.lua | Who may use the prop placer |
server/phonebridge.lua | Mail and message notifications on a phone resource |
server/business/bridge.lua | Employees: jobs, grades, multijob providers, and FW.PayNotify, which decides where the You were paid message goes |
server/business/society.lua | Employees: company funds |
data/mdt/dispatch.lua | Dispatch call types, priorities, timings and detection (Data files) |
server/mdt/dispatch_compat.lua | Alerts from other dispatch scripts |
server/mdt/phone911.lua | Which phone's 911 calls reach the dispatch board (nx_phone is wired, with a template for others) |
server/mdt/jail.lua | Handing a sentence to your jail script (Config.MDT.JailAdapter, or Mode = 'custom' with your own code) |
server/mdt/clipstore.lua | Where bodycam clips are uploaded (FiveManage by default) |
server/mdt/webhook.lua | The Discord backup alert |
server/mdt/hooks.lua | MDT server events for your scripts (Events) |
server/mdt/billing/, hotline/, payout/ | Ticket billing, the tip and appeal phone lines, reward payouts |
client/mdt_field_ui.lua | Officer alerts in the world: notifications, call blips, sounds |
client/mdt_detect.lua | Automatic crime detection (gunshots, car theft, alarms) |
client/mdt_vehlabels.lua | Vehicle names on the MDT, for addon cars |
FW.PayNotify(src, n) receives n = { job, title, message, amount, count }
once per summed batch of payments. By default it sends the message to
nx_phone's Wallet and falls back to an ox_lib toast. Replace its body to use
another phone, and keep it safe to call when that phone is missing.
MDT#
Config.MDT configures the records terminal for police-style jobs. It
ships enabled, and access is decided server-side from the player's live
framework job.
Config.MDT.Agenciesholds one entry per agency:{ key, label, jobs, pack }.jobsare your framework's job names, matched exactly against the player's live job.packpicks the vocabulary and charge template:'generic'(default),'us', or'fi'. Pointjobsat your real job names before going live. If no entry matches a job on your server, the boot self-check warns that the MDT will admit nobody.- Ranks mirror your job grades. The MDT derives one rank per grade of
the agency's first listed job, named as your framework names that
grade. The top grade becomes the command rank. Change ranks in your
framework's job grades, not in
config.lua. - Permissions. Opening the MDT and choosing an agency follow the job
match above. What a rank can do inside is a per-rank matrix managed
from the MDT's own Department > Administration screen by the command
rank. The
nx_computer.adminACE plays no part in MDT content. Config.MDT.PersonSearchgates citizen name lookup:'open','warrant'(an approved warrant is required), or'off'. Name search is forgiving: every word typed must appear in the name, in any order, partly typed, ignoring capitals and accents.Config.MDT.EvidenceLockersis a list ofvector3evidence-room locations. Leave it empty for no proximity requirement.- Phone tools. Seized-phone extraction, cell tower dumps and device
traces need
nx_phone. Turn them off withConfig.MDT.Phone.Enabled. - Optional features go dark, not broken, when left unconfigured.
Bodycam (
Config.MDT.Bodycam) needs thescreencaptureresource plus a FiveManage token inconfig_server.lua. The Bank investigation lens (Config.MDT.Bank.Backend, default'auto') needsnx_realbanking, or set it to'none'. Cross-agency sharing (Config.MDT.External.Enabled) needs at least two agencies. - Backup alerts.
Config.MDT.ShiftAlertlets an officer who is alone on duty ask for backup on Discord. Put the webhook URL per agency inconfig_server.luaunderConfig.MDTWebhooks, keyed by the agencykey.
Back up your database before updating from a version older than 1.5.0. The MDT moves its tables forward by itself on the first full restart (new tables and columns only, nothing existing changed), and a newer database refuses to start an older nx_computer. Restart the whole server, not just the resource. If a start finds a newer database than it knows, it stops the MDT and prints the restore command in the console.
Police, EMS and fire#
An agency is police unless it says otherwise. Add service = 'ems' or
service = 'fire' to its entry in Config.MDT.Agencies:
{ key = 'ems', label = 'Los Santos Medical Services', jobs = { 'ambulance' }, service = 'ems' },EMS and fire get Today, Dispatch, Reports and Department, with their own
report templates and wording. On a call they see cautions only (armed
suspect, scene not secure), never records or warrants. They can find a
person by name, which shows the name, date of birth and phone number only;
Config.MDT.ServicePersonLookup = false turns that off. A misspelt service
is refused with one console line and that agency is not set up.
Dispatch and keys#
Built-in dispatch is off by default (Config.MDT.Dispatch.Enabled = false),
so the MDT works next to the dispatch script you already run. Set it to true
to use nx_computer as your dispatch: the Dispatch area, automatic alerts, 911
calls from nx_phone, the phone MDT app and the in-car Dash come with it. Other
scripts can raise calls with the DispatchAlert export.
Officers work calls without opening the laptop. The default keys are in
Config.MDT.Dispatch.Keys:
Keys = { Status = false, Attach = 'Y', Clear = 'U', Panic = false, Bodycam = 'J' },| Key | Action |
|---|---|
| Status | Not bound. Set your status (Available, En route, On scene, Busy, Out of service); officers also set it on the MDT |
| Y | Respond to the newest call you were alerted to |
| U | Clear yourself from your call |
| Panic | Not bound. One press sends a top-priority call to the whole department, so officers bind it themselves |
| J | Start or stop your bodycam |
false leaves an action unbound and '' uses the built-in default. Players
change their own keys in the game's settings, under Key Bindings, FiveM, and
their own choice always wins. A default you change in config.lua reaches
players who join after the change.
The status key used to default to F5, which most servers already use. It now
has its own Key Bindings entry (nxmdt_statuskey), so an F5 saved from the old
default no longer opens the status picker. Officers who want a status key bind
it once in Key Bindings, FiveM.
Alerts from other dispatch scripts#
Scripts that send alerts to another dispatch resource keep working. With
Config.MDT.Dispatch.Compat = 'auto' (the default), nx_computer picks up the
alerts of ps-dispatch, cd_dispatch, qs-dispatch, core_dispatch,
rcore_dispatch, linden_outlawalert, esx_outlawalert and QBCore's
police:server:policeAlert, but only while that dispatch script is not
running, so nothing arrives twice. 'mirror' picks them up even while the
original runs, and 'off' picks up nothing.
Some scripts need the dispatch resource itself, because they call its exports
or list it as a dependency. For those, the download carries a [nx_compat]
folder with a stand-in for each one. A stand-in takes the original's name,
answers its exports and sends the alerts to the MDT:
| Stand-in | Takes the place of |
|---|---|
nx_compat_psdispatch | ps-dispatch |
nx_compat_cddispatch | cd_dispatch |
nx_compat_qsdispatch | qs-dispatch |
nx_compat_coredispatch | core_dispatch |
nx_compat_rcoredispatch | rcore_dispatch |
nx_compat_tkdispatch | tk_dispatch |
nx_compat_lindenoutlaw | linden_outlawalert |
nx_compat_esxoutlaw | esx_outlawalert |
Stop the original and move its folder out of
resources/. Never run a stand-in beside its original.Copy
[nx_compat]intoresources/and start the stand-ins you need after nx_computer:Shellensure nx_computerensure nx_compat_psdispatchensure [nx_compat]starts all of them. Each one switches itself off when a folder with its original's name is on the server.Restart the whole server the first time you turn a stand-in on. The name it takes over only registers on a full restart.
Two server convars override the automatic choice:
set nx_compat_mode "auto" # every stand-in: auto | on | offset nx_compat_psdispatch "off" # one stand-in, by its name without nx_compat_Tickets and billing#
Officers write tickets from a person's record, a plate or a call. The ticket
reaches the citizen's phone (with nx_phone) and becomes a bill through
Config.MDT.Tickets:
Backend = 'auto'(default) uses the first script inBackendsthat is running:nx_realbanking,okokBilling,esx_billing,qb-phone,jim-payments,codem-billing,Renewed-Banking.Backend = 'record'sends no bill: the ticket is paid at the station and an officer marks it paid. This is also what happens when none of the scripts is running.Backend = '<name>'uses that one script, and falls back to'record'when it is not running.
With nx_realbanking the fine goes to the department's society account, else
the government account. It needs nx_computer in nx_realbanking's
Config.Fines.allowedResources (the default).
The billing adapters are plain Lua files in server/mdt/billing/. To bill
through a script that is not listed, copy server/mdt/billing/_template.lua,
fill in its one call, and name it in Backend or Backends.
Reports and department settings#
Officers file reports on their own. A department's command (or anyone given
the permission) changes these in Department, Settings. config.lua holds the
server-wide starting values:
| Setting | Config | Default |
|---|---|---|
| Reports and sentences need a second officer | Config.MDT.Reports.Countersign | off |
| Days to pay a ticket | Config.MDT.Tickets.DueDays | 7 |
| Grace days before a warrant request | Config.MDT.Tickets.GraceDays | 3 |
| An unpaid ticket raises a warrant request | Config.MDT.Tickets.WarrantOnUnpaid | on |
| Status turns On scene on arrival | Config.MDT.Dispatch.AutoOnScene | on |
Report templates live in the vocabulary packs (data/mdt/pack_*.lua). A
template's services list decides which departments use it; see
Data files.
The MDT on the phone#
With nx_phone started after nx_computer, officers get an MDT app on the phone
while dispatch runs: calls, status, waypoint, plate and name lookup, tickets,
look-outs and panic, with the call they are on shown on the phone's island and
lock screen. Nothing to configure. The app shows only for a job that belongs to
an agency, and uses the same permissions as the field keys. To hide it, add
mdt = true to nx_phone's Config.Apps.Disabled.
Another phone script can build the same app; see The MDT on another phone or HUD.
The MDT in the car#
On duty in an emergency vehicle, the driver and front passenger get the Dash:
a status pill at the top right with new calls (Y responds, Backspace
dismisses), the call they are on and plate reader hits, and a sheet on F10 for
status, lookup, calls, units and a two-step panic. With nx_hud it is drawn in
nx_hud's glass; without it, nx_computer draws its own. Settings are in
Config.MDT.Dash, including OnFoot to show it whenever an officer is on
duty, and the optional dashboard screen (Cabin, off by default).
Tip line, appeals and bodycams#
- Tip line and witness appeals need a phone script that supports
hotlines. nx_phone works out of the box; another phone needs a small
adapter in
server/mdt/hotline/(_template.luashows the shape). The public texts 8477 to reach the tip line, and appeals arrive from 27732. Change them inConfig.MDT.Streetif they clash with something on your server. - Tip rewards are paid from the department's society account into the
tipster's bank (nx_realbanking out of the box; adapters in
server/mdt/payout/). With no banking adapter, a reward is written down and paid by hand. - Bodycams that start by themselves (on panic, on arrival, with the siren)
need the
screencaptureresource and a FiveManage token inconfig_server.lua, like every bodycam clip.
Employees#
The Employees app lets a business run its staff from the computer: hire by
sending a job offer, change grades, pay wages, keep personnel files, post
announcements and see who is on duty. Employees see their own hours,
payslips and file. It is on by default; set Config.Business.Enabled = false
to turn it off. No SQL import is needed.
- Who manages: the grades in
Config.Business.AllowedRanks(QBCore and Qboxisbossgrades count too). The top grade is the owner. Bosses give other grades access from the app's Access page. - Hiring: the boss sends an offer, and the player accepts or declines it in their email. Their job changes only when they accept. Offers reach offline players too.
- Wages: tracked hours are paid from the company account, by hand from
the Payroll page or automatically on the
AutoPayschedule. Each payment shows in the employee's Banking, with a payslip email and a PDF in their Downloads, and a You were paid message on the phone's Wallet (with nx_phone) or as a toast (Config.Business.PayNotify). SetPayroll.Mode = 'framework'(or per job inPerJobModes) if your framework already pays salaries, so nobody is paid twice. - Company money:
Society.Backend = 'auto'picksnx_realbankingfirst, then your framework's society or banking resource. An open Employees window follows the balance live (Config.Business.LiveFunds). - Multijob: set
MultiJob.Providerto'nx_phone'or'core_multijob'if you use one. Withnx_phone, add'nx_computer'to itsConfig.Shift.MultiJob.ExportResources. - With nx_employeemanagement: both can run on the same server and show the same staff, wages and history. Use version 2.2.0 or newer. While it runs, it does the hour tracking and automatic pay, and the computer app works through it.
Newsroom#
The Newsroom app is the city's news desk. Players whose job is listed in
Config.Newsroom.Jobs (by default reporter and weazel, from grade 0)
write and publish stories. The editor grade (Config.Newsroom.EditorGrade,
default the job's boss grade) can edit anyone's story and publish Breaking
news, at most once per BreakingCooldownMin minutes across the server.
Point Jobs at your news job names. Published stories show on the app's
front page and, when nx_phone runs, in its Bulletin app. Set
Config.Newsroom.Enabled = false to turn the app off.
Mail addresses#
Every account's address is <username>@<domain>. With
Config.Mail.Domain = 'auto' (the default), the domain is the
nx_mail_domain convar when you set one, otherwise your sv_projectName
as a .com. To choose it yourself, set the convar in server.cfg:
setr nx_mail_domain "yourcity.com"Or set Config.Mail.Domain = 'yourcity.com'. Mail sent to an older domain
keeps arriving (Config.Mail.LegacyDomains), and a renamed account still
receives mail at its old name.
Troubleshooting#
On start, nx_computer prints a configuration self-check to the server
console. Each warning names the exact Config key at fault.
| Symptom | Likely cause and fix |
|---|---|
Config.Framework ... core resource not started | Wrong Config.Framework, or the framework core ensures after nx_computer. Fix the value or the load order. |
Config.LaptopItem ... not registered in ox_inventory | Add the laptop item snippet above and restart ox_inventory. |
Config.Darknet.AccessItem ... not registered | Register the item (default usb), repoint AccessItem, or disable Darknet. |
Config.Banking.Backend = 'realbanking' but nx_realbanking is not started | Start nx_realbanking, or use 'auto' or 'framework'. |
Config.Locale ... is not a bundled locale | Use one of the 10 supported codes. |
Config.MDT.Agencies is empty ... | No agency jobs entry matches a job on your server. Set the real job names in Config.MDT.Agencies. |
Database schema did not bootstrap | Check the oxmysql connection string and that the DB user can CREATE TABLE. |
| Screen blank for a moment on open | Keep Config.Prewarm.Enabled = true. It starts the desktop in the background as a player walks up to a closed laptop. |
| Admin Console denied | Grant the nx_computer.admin ACE (section above). |
Network use#
The markets, the map and the fonts run on your server. The resource only reaches out when a feature you use needs it:
- FiveManage, once you set
Config.Media.FiveManageToken: uploads, camera photos and bodycam clips. - Discord webhooks, if you set them in
config_server.lua. - A STUN server (Google's by default) to connect meetings and live
bodycam between players. Change it, or add your own TURN server, in
Config.Meetings.IceServersandConfig.MDT.LiveBodycam.IceServers. - Images from the hosts you allow in
Config.SiteBuilder.AllowedImageHosts, and imgur links in the vehicle marketplace. - Satellite and Grid map styles, only if you set
Config.MapTileCDN.
