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
- Multi-framework support: QBX (Qbox), QBCore, ESX — auto-detected
- Multi-inventory support: ox_inventory, qb-inventory, ps-inventory, lj-inventory — auto-detected
- USB-based app unlocking via personal stash dock
- App registry system — add, remove, enable/disable apps from config
- Draggable app icon positioning (saved per player)
- Built-in music player (supports xSound for YouTube, or direct audio URLs)
- Customizable theme color and wallpaper
- Per-player USB dock linked to citizen ID
- Easy custom app integration via events or exports
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,
},
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'
}
}
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() |
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
- Get the Tablet — Obtain the
tabletitem - Get USB Keys — Collect USB keys for apps that require them
- Insert USB Keys — Use the tablet and click "Insert Required Items" to open the USB dock
- Place USB Keys — Drag USB keys into the dock slots
- Close Dock — Close the inventory
- Use Tablet — Use the tablet item to open it — only apps with inserted USBs (or no USB requirement) will be visible
- Open Apps — Click on available app icons to launch them
- Rearrange Apps — Drag app icons to reposition them — positions are saved per player
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
- USB dock automatically removes non-whitelisted items
- Each player has their own personal USB dock (linked to citizen ID)
- Invalid items are returned to player inventory
Troubleshooting
Apps not showing
- Check if the app has
using = truein the config - If the app requires a USB, check if the USB is inserted in the dock
- If using ox_inventory, verify the USB item is in the stash whitelist
Tablet won't open
- Ensure
ox_liband your framework are started beforeNR_Tablet - Check console for errors (F8)
- Enable
Config.Debug = truefor detailed logs - Verify the
tabletitem is properly configured in your inventory
Items not saving in dock
- If using ox_inventory, verify the stash is configured in
ox_inventory/data/stashes.lua - Ensure USB items are in the stash whitelist
- Restart ox_inventory after making changes to stashes
Custom app not working
- Make sure the app
idin config matches theif app == "id"check incustom_apps.lua - Verify the export or event exists in the target script
- Check that the target script is started before
NR_Tablet - Check console for errors when clicking the app
Framework or inventory not detected
- Make sure your framework and inventory resources are started before
NR_Tabletinserver.cfg - Enable
Config.Debug = trueto see which framework and inventory were detected in the console
Support
Need help? Join our Discord server for community support and updates.