NX CreativeNX CreativeDocs
Scriptsnx_computer

Installation

Dependencies, inventory items, admin ACE, the banking backend, the MDT, the Newsroom, mail addresses, and first-start checks for nx_computer.

This page covers what nx_computer needs beyond the generic installation guide: its dependency set, the inventory items, admin access, the banking backend, the MDT, the Newsroom, and mail addresses.

Dependencies

oxmysql
Required

Database access. All tables are created automatically at runtime.

ox_lib
Required

Callbacks, UI helpers, and locale glue.

ox_target
Required

Opening and picking up the laptop, pairing the monitor and projector.

ox_inventory
Required

The laptop, projector, camera, polaroid, and darknet access items.

nx-3d
Required

Separate download from NX Creative, included with your purchase. Renders the OS onto the laptop screen in the world.

nx_realbanking
Optional

Optional. Richer Banking backend with per-character accounts. See the banking backend section below.

screencapture
Optional

Optional. Required for the in-world camera item and for MDT bodycam clips.

pma-voice
Optional

Optional. Carries voice in the Meetings app. Without it, meetings run with video only.

lb-phone
Optional

Optional. Enables the phone bridge (laptop notifications on the phone) and phone photo sync. Both switch on automatically when it is running.

nx_phone
Optional

Optional. Shares accounts and mail addresses with the laptop, shows Newsroom stories in its Bulletin app, and adds phone tools to the MDT.

nx_write
Optional

Optional. Lets players draw on polaroids.

Start order

nx-3d must start before nx_computer, and both after the ox stack:

ensure ox_lib
ensure oxmysql
ensure ox_inventory
ensure ox_target

ensure nx-3d
ensure nx_computer

Database: 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 before nx_computer.
  • Config.Locale: one of en, 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.admin

The 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): use nx_realbanking automatically 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 to nx_realbanking (per-character accounts, invoices, credit). Requires nx_realbanking to 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.

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.Agencies holds one entry per agency: { key, label, jobs, pack }. jobs are your framework's job names, matched exactly against the player's live job. pack picks the vocabulary and charge template: 'generic' (default), 'us', or 'fi'. Point jobs at 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.admin ACE plays no part in MDT content.
  • Config.MDT.PersonSearch gates citizen name lookup: 'open', 'warrant' (an approved warrant is required), or 'off'.
  • Config.MDT.EvidenceLockers is a list of vector3 evidence-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 with Config.MDT.Phone.Enabled.
  • Optional features go dark, not broken, when left unconfigured. Bodycam (Config.MDT.Bodycam) needs the screencapture resource plus a FiveManage token in config_server.lua. The Bank investigation lens (Config.MDT.Bank.Backend, default 'auto') needs nx_realbanking, or set it to 'none'. Cross-agency sharing (Config.MDT.External.Enabled) needs at least two agencies.
  • Backup alerts. Config.MDT.ShiftAlert lets an officer who is alone on duty ask for backup on Discord. Put the webhook URL per agency in config_server.lua under Config.MDTWebhooks, keyed by the agency key.

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.

SymptomLikely cause and fix
Config.Framework ... core resource not startedWrong Config.Framework, or the framework core ensures after nx_computer. Fix the value or the load order.
Config.LaptopItem ... not registered in ox_inventoryAdd the laptop item snippet above and restart ox_inventory.
Config.Darknet.AccessItem ... not registeredRegister the item (default usb), repoint AccessItem, or disable Darknet.
Config.Banking.Backend = 'realbanking' but nx_realbanking is not startedStart nx_realbanking, or use 'auto' or 'framework'.
Config.Locale ... is not a bundled localeUse 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 bootstrapCheck the oxmysql connection string and that the DB user can CREATE TABLE.
Screen blank for a moment on openKeep Config.Prewarm.Enabled = true. It starts the desktop in the background as a player walks up to a closed laptop.
Admin Console deniedGrant 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.IceServers and Config.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.
NX Docs