NR_Tablet

A customizable in-game tablet system with USB-based app unlocking, personal stash docking, music player, and full support for adding your own custom apps. Multi-framework and multi-inventory support with auto-detection.

Features

Dependencies

Resource Description Required
qbx_core / qb-core / es_extended Framework (one required, auto-detected) Yes
ox_inventory / qb-inventory / ps-inventory / lj-inventory Inventory system (one required, auto-detected) Yes
ox_lib Utility library Yes
oxmysql Database Yes
xSound YouTube music player support (optional — without it, music player only supports direct audio URLs) No

Installation

Step 1: Resource Installation

Download the resource and extract it to your resources folder:

resources/
  └── [echo]/
      └── NR_Tablet/
          ├── Open/              <-- Editable files
          │   ├── config.lua
          │   ├── custom_apps.lua
          │   └── sv_bridge.lua
          ├── Escrowed/          <-- Encrypted, do not modify
          ├── Install/           <-- Item images
          └── web/               <-- UI files

Add to your server.cfg:

ensure NR_Tablet

Make sure NR_Tablet starts after your framework, inventory, and ox_lib.

Step 2: Add Inventory Items

The tablet and USB keys need to be added to your inventory resource. Item images are provided in the Install/ folder.

ox_inventory (ox_inventory/data/items.lua)

['tablet'] = {
    label = 'Player Tablet',
    weight = 500,
    stack = false,
    close = false,
    consume = 1,
    buttons = {
        {
            label = 'Insert Required Items',
            action = function(slot)
                TriggerServerEvent('NR_Tablet:insertItems')
            end
        },
    },
    server = {
        export = 'NR_Tablet.tablet'
    }
},
['mdt_usb'] = {
    label = 'MDT App Access Key',
    weight = 1,
    stack = false,
    close = true,
},

['boost_usb'] = {
    label = 'Boost App Access Key',
    weight = 1,
    stack = false,
    close = true,
},

['house_usb'] = {
    label = 'House Robbery App Access Key',
    weight = 1,
    stack = false,
    close = true,
},

['ug_usb'] = {
    label = 'Race App Access Key',
    weight = 1,
    stack = false,
    close = true,
},
Note

You only need to add USB items for apps that you have set using = true and have a usbItem in the app registry. If you disable an app or it has no USB requirement, you don't need its USB item.

QBCore / Qbox (qb-core/shared/items.lua)

tablet = {
    name = 'tablet',
    label = 'Player Tablet',
    weight = 500,
    type = 'item',
    image = 'tablet.png',
    unique = true,
    useable = true,
    shouldClose = false,
    description = 'A personal tablet device.'
},

mdt_usb = {
    name = 'mdt_usb',
    label = 'MDT App Access Key',
    weight = 1,
    type = 'item',
    image = 'mdt_usb.png',
    unique = true,
    useable = false,
    shouldClose = true,
    description = 'USB key that unlocks the MDT app on your tablet.'
},

boost_usb = {
    name = 'boost_usb',
    label = 'Boost App Access Key',
    weight = 1,
    type = 'item',
    image = 'boost_usb.png',
    unique = true,
    useable = false,
    shouldClose = true,
    description = 'USB key that unlocks the Boosting app on your tablet.'
},

house_usb = {
    name = 'house_usb',
    label = 'House Robbery App Access Key',
    weight = 1,
    type = 'item',
    image = 'house_usb.png',
    unique = true,
    useable = false,
    shouldClose = true,
    description = 'USB key that unlocks the House Robbery app on your tablet.'
},

ug_usb = {
    name = 'ug_usb',
    label = 'Race App Access Key',
    weight = 1,
    type = 'item',
    image = 'ug_usb.png',
    unique = true,
    useable = false,
    shouldClose = true,
    description = 'USB key that unlocks the Racing app on your tablet.'
},

Step 3: Configure Stash (ox_inventory only)

If using ox_inventory, navigate to ox_inventory/data/stashes.lua and add this stash configuration:

{
    name = 'tablet_stash',
    label = 'USB Dock',
    slots = 10,
    weight = 10000,
    whitelist = {
        'ug_usb',
        'mdt_usb',
        'boost_usb',
        'house_usb'
    }
}
Note

Add any custom USB items you create to the whitelist array. Only whitelisted items can be placed in the USB dock.

Step 4: Restart

Restart your server. The framework and inventory are auto-detected — no manual configuration needed for those.

Configuration

All configuration is done in NR_Tablet/Open/config.lua. Framework and inventory are auto-detected.

Option Default Description
Config.Debug false Enable debug prints in console
Config.Theme '#00FFFF' Accent color for the tablet UI
Config.Background '' URL for wallpaper image, or leave empty for default background
Config.Framework Auto-detected Detected automatically: 'qbx', 'qb', 'esx', or 'standalone'
Config.Inventory Auto-detected Detected automatically: 'ox_inventory' or 'qb-inventory'

App Registry

Apps are defined in the CustomApps table in NR_Tablet/Open/config.lua. Each app entry has the following fields:

Field Type Description
id string Unique identifier used in custom_apps.lua to handle the app open event
label string Display name shown under the app icon
icon string Path to icon image relative to web/ folder
usbItem string or nil Required USB item name, or nil for always visible (no USB needed)
using boolean true = app is enabled, false = app is completely hidden from the tablet

Example App Entry

{
    id = "g6",
    label = "Gruppe Sechs",
    icon = "assets/app-icons/g6.png",
    usbItem = nil,       -- nil = no USB required, always visible
    using = true,        -- true = enabled, false = hidden
},

Enabling / Disabling Apps

To hide an app from the tablet entirely, set using = false. The app will not appear on the tablet regardless of USB status:

-- This app will NOT appear on the tablet
{
    id = "mdt",
    label = "MDT",
    icon = "assets/app-icons/mdt.png",
    usbItem = "mdt_usb",
    using = false,          -- disabled
},

Default Apps

App ID Label Required USB Opens
business Realestate None exports['vms_housing']:OpenMarketplace()
mdt MDT mdt_usb TriggerServerEvent('mdt:server:openMDT')
underground Underground ug_usb TriggerEvent('codem-racing:openRacingTablet')
hq Crew None exports['cs_crime']:openCrimeMDT()
house Robbery house_usb exports['peak_houserobbery']:openTablet()
boost Boosting boost_usb TriggerEvent("rahe-boosting:client:openTablet")
g6 Gruppe Sechs None exports['NR_G6']:openG6()
tow Tow None exports['NR_Towing']:openTowing()
Important

If you don't have a script that an app calls (e.g. vms_housing, cs_crime), set that app to using = false in the config. Otherwise players will see the app but it won't do anything when clicked.

Adding Custom Apps

1. Register the App

Add your app to the CustomApps table in NR_Tablet/Open/config.lua:

{
    id = "myapp",
    label = "My App",
    icon = "assets/app-icons/myapp.png",
    usbItem = nil,       -- or "myapp_usb" to require a USB key
    using = true,
},

2. Add App Icon

Place your app icon (PNG recommended) in:

NR_Tablet/web/assets/app-icons/myapp.png

3. Add App Logic

Open NR_Tablet/Open/custom_apps.lua and add your app's action inside the openApp callback. Find the elseif chain and add your entry:

    elseif app == "myapp" then
        DebugPrint("Opening My App")

        -- Option 1: Trigger a client event
        TriggerEvent('myresource:openApp')

        -- Option 2: Use a client export
        exports['myresource']:openApp()

        -- Option 3: Trigger a server event
        TriggerServerEvent('myresource:server:openApp')

4. Add USB Requirement (Optional)

If your app should require a USB key:

A. Set usbItem in the app entry:

{
    id = "myapp",
    label = "My App",
    icon = "assets/app-icons/myapp.png",
    usbItem = "myapp_usb",     -- requires this USB item in the dock
    using = true,
},

B. Add the USB item to your inventory:

For ox_inventory (ox_inventory/data/items.lua):

['myapp_usb'] = {
    label = 'My App Access Key',
    weight = 1,
    stack = false,
    close = true,
},

For QBCore/Qbox (qb-core/shared/items.lua):

myapp_usb = {
    name = 'myapp_usb',
    label = 'My App Access Key',
    weight = 1,
    type = 'item',
    image = 'myapp_usb.png',
    unique = true,
    useable = false,
    shouldClose = true,
    description = 'USB key that unlocks My App on your tablet.'
},

C. Add to the stash whitelist in ox_inventory/data/stashes.lua (ox_inventory only):

{
    name = 'tablet_stash',
    label = 'USB Dock',
    slots = 10,
    weight = 10000,
    whitelist = {
        'ug_usb',
        'mdt_usb',
        'boost_usb',
        'house_usb',
        'myapp_usb'    -- add your USB item here
    }
}

Usage

For Players

For Admins

Give items via commands:

/giveitem [player_id] tablet 1
/giveitem [player_id] mdt_usb 1
/giveitem [player_id] boost_usb 1
/giveitem [player_id] house_usb 1
/giveitem [player_id] ug_usb 1

File Structure

Only files in the Open/ folder can be edited. The Escrowed/ folder contains encrypted files.

File Purpose Editable
Open/config.lua Settings, theme, app registry (CustomApps table) Yes
Open/custom_apps.lua App open logic (events/exports for each app) Yes
Open/sv_bridge.lua Server bridge (framework/inventory abstraction) Yes
Escrowed/ Core tablet logic (encrypted) No
web/ UI files (HTML, CSS, JS) Yes
Install/ Item images for your inventory N/A

Security Features

Troubleshooting

Apps not showing

Tablet won't open

Items not saving in dock

Custom app not working

Framework or inventory not detected

Support

Need help? Join our Discord server for community support and updates.