Skip to content

Installation

0R SmartTab — Installation#

Do the steps below (in order). This is a tablet item resource (inventory-based).

Links: Configuration · Metadata setup · Exports · 0r-dispatch setup


What you need ?#

RequirementPurpose
0r_libRequired SmartTab dependency
ox_libShared utilities (@ox_lib/init.lua in manifest)
oxmysqlMySQL access (mail, messages, MDT, bank, etc.)
xsoundMusic app playback
0r-dispatchYour keymaster has been delivered to your account.
One supported inventoryox, qb, qs, core, codem, ls, lj, ps

Install a supported framework and inventory before starting SmartTab.


Prison Support#

You can download and use qb-prison, specifically adapted for the PoliceApp on tablets, from here.

ESX works seamlessly with QBCore and QBOX.

https://github.com/comaven/qb-prison


1. Copy The Resource#

  1. Copy the entire 0r-smarttab folder into your server resources tree (e.g. resources/[0resmon]/0r-smarttab/).
  2. Do not rename the folder (0r-smarttab must stay as expected for ensure and internal paths).
  3. Confirm web/dist exists (see §4).

2. Database Installation#

SmartTab does not automatically create database tables for you.
You must import the SQL file manually one time only.

Use the same MySQL database that your oxmysql connection string uses.

Step 1 - Find the SQL File#

Depending on your package, use:

  • tablet.sql (inside the resource root)
    or
  • the files inside the sql/ folder

Step 2 - Import the SQL#

Open your database manager:

  • HeidiSQL
  • phpMyAdmin
  • DBeaver
  • Any MySQL client

Then:

  1. Open your server database
  2. Click Query, Import, or Run SQL
  3. Select the SQL file
  4. Run it

3. Inventory Setups#

Add to your items file (e.g. ox_inventory/data/items.lua or your override).

lua
['tablet'] = {
    label = 'Tablet',
    weight = 500,
    stack = false,  -- each unit can have its own metadata / serial
    close = true,
    description = 'SmartPad Tablet',
    -- SmartTab registers item use automatically.
},

Image: add tablet.png (or your icon name) under ox_inventory/web/images if your items use images.



4. Server.cfg load order#

ensure lines run in order. Anything SmartTab relies on must start before 0r-smarttab.

Minimum idea:

  1. 0r_lib, ox_lib, oxmysql, xsound, your inventory
  2. 0r-dispatch (and its own dependencies — see DISPATCH_SETUP.md)
  3. 0r-smarttab

Example (resource names may differ on your host):

cfg
ensure 0r_lib
ensure ox_lib
ensure oxmysql
ensure xsound
ensure ox_inventory

ensure 0r-dispatch

ensure 0r-smarttab
  • Put ox_inventory (or your inventory) before 0r-smarttab so hooks and AddItem paths work reliably.
  • If SmartTab starts before 0r_lib / oxmysql / 0r-dispatch, expect errors and broken features.

The tablet is now ready to use! Just log in to the server and start using it!



Quick configuration#

WhereWhat
shared/config.luaConfig.TabletItem — must match your inventory item name (default tablet). Config.UseMetadata — ownership via item serial when true.
server/config.jsonServer-side mirror: tabletItem, useMetadata, upload URLs, mail, etc. Admin panel can edit and save this file.

Checklist#

  • 0r_lib, ox_lib, oxmysql, xsound, inventory, 0r-dispatch installed and starting without errors
  • Inventory starts before 0r-smarttab in server.cfg
  • SQL imported manually into the oxmysql database
  • Folder name 0r-smarttab unchanged; web/dist present
  • ensure 0r-dispatch before ensure 0r-smarttab
  • Tablet item exists in your inventory config; name matches Config.TabletItem / tabletItem
  • Optional: prison resource if you use Police jail features
  • If UseMetadata on: read METADATA_SETUP.md and use GiveTablet (or proper metadata) for shops

Troubleshooting#

SymptomThings to check
Console errors on startLoad order: 0r_lib, oxmysql, inventory, 0r-dispatch before SmartTab.
Tablet item “does nothing”Item name matches config; inventory resource running; 0r_lib installed and started before SmartTab.
No serial / metadata (ox)useMetadata: true in server/config.json and Config.UseMetadata in shared/config.lua; SmartTab after ox_inventory in server.cfg; item name matches hook filter.

Last updated for SmartTab install flow: dependencies, DB, cfg order, inventories, and optional prison note.