NEXO DOCSv1 · ENES
docs / laptop / nexo-laptop

Nexo Laptop

In-game laptop with a desktop, windows, styles, password and apps. It comes free with any app.

v1.0QboxQBCoreESXox_coreND_CoreStandalone

Requirements

ResourceRequired?What for
oxmysqlRecommendedStore accounts, notes and mail. Without it, data goes to data/users.json
InventoryYesox, qs, codem, tgiann, core, origen, qb, ps, lj or the framework's
FrameworkAuto-detectedQbox, QBCore, ESX, ox_core, ND_Core or none

Installation

  1. Download the resource From keymaster.fivem.net → Granted Assets.
  2. Copy it to resources/ Named nexo_laptop.
    Don't rename itThe script only starts if the folder is named exactly nexo_laptop (otherwise it warns in the console).
  3. Add it to your server.cfg After your framework, inventory and oxmysql.
    # After your framework and inventory
    ensure oxmysql
    ensure ox_inventory
    ensure nexo_laptop
  4. (Optional) Admin permission To remove forgotten passwords.
    add_ace group.admin command.laptopresetpass allow

On start, the console shows what it detected:

[nexo_laptop] framework: qbx | inventario: ox_inventory | guardado: oxmysql | contraseña: character

Create the item

-- ox_inventory/data/items.lua
['laptop'] = {
    label = 'Laptop', weight = 1500, stack = false, close = true,
    client = { export = 'nexo_laptop.useLaptop' },
},
Nothing happens when using it?Set Config.Debug = true and check the console on start: it prints item "laptop" usable -> … with how it was registered. It also opens with /laptop.

Configuration

Config.Locale = 'en'   -- 'es' · 'en' · 'fr' · 'de' · 'pt'
Config.Command = 'laptop'
Config.Password.mode = 'character'   -- 'character' or 'item'
Config.Battery.enabled = false
'character''item'
The account belongs to…the characterthe laptop (serial NX-4F2A-91C3)
If the laptop is stolenthe thief logs into their own accountit stays locked with the owner's password
Requirementsnoneinventory with metadata

Admin: /laptopresetpass 12 (player with id 12) or /laptopresetpass NX-4F2A-91C3 (a specific laptop).

Built-in apps

AppWhat it does
DocumentsFile explorer with your notes and emails, search and preview.
NotesEditor with autosave, pinned notes and colour labels.
MailYour own address (name.surname@nexo.ls). Delivered even if the other player is offline.
TerminalHacking practice with 4 minigames, difficulty levels and records.
NEXO SwapBuy, sell and send NXC to other players by ID, name or code.
CalculatorNo rounding errors, with history and keyboard support.

Exports

exports['nexo_laptop']:Open(source)
exports['nexo_laptop']:IsUnlocked(source)
exports['nexo_laptop']:SendMail('alex.moreno@nexo.ls', { from = 'Banco Central', subject = 'Recibo', body = '...' })
exports['nexo_laptop']:GetNXC(source)
exports['nexo_laptop']:AddNXC(source, amount)
exports['nexo_laptop']:RemoveNXC(source, amount)   -- true if the player had enough

Build apps (SDK)

Each app can be its own resource and show up on the laptop without touching nexo_laptop. Copy nexo_app_template, rename it and edit it.

local APP = {
    id = 'mi_app', label = { es = 'Mi app', en = 'My app' },
    icon = 'store', color = '#2563eb',
    ui = 'html/index.html', size = { w = 760, h = 500 },
    desktop = true,
}
CreateThread(function()
    while GetResourceState('nexo_laptop') ~= 'started' do Wait(500) end
    exports.nexo_laptop:AddApp(APP)
end)

FAQ

Do I need to buy the laptop separately?

No. The Nexo Laptop comes free with any app and is delivered to your Keymaster along with it.

How is it used in game?

Create the laptop item in your inventory (the script includes instructions for ox_inventory, QBCore, ESX and more) and players open it by using it. It can also be opened with the /laptop command.

Does it work with my framework and inventory?

Yes: Qbox, QBCore, ESX, ox_core, ND_Core or no framework, and the most used inventories. It detects them on start.

Where is the data stored?

With oxmysql, in your database (tables are created automatically). Without oxmysql, in a file inside the script.

What if the laptop gets stolen?

Your choice. In per-character mode, the thief logs into their own account. In per-laptop mode, it stays locked with the owner's password.

Do the apps share money?

Yes. Boosting, Black Market and NEXO Swap use the same currency, NXC: what you earn in one app can be spent or exchanged in another.

Can I build my own apps?

Yes. The laptop includes an SDK to make apps as separate resources that show up on the desktop without touching the laptop.