Installation

SmartPad Installation Guide

This document will guide you through the basic setup of SmartPad, including inventory integration and database initialization.


🧳 Inventory Setup

📦 QB Inventory, QS Inventory, LJ Inventory, PS Inventory, Core Inventory

If you are using these inventories you must add the following items to your qb-core/shared/items.lua file: or wherever the item list is.

smartpad = {
    name = 'smartpad',
    label = 'SmartPad',
    weight = 2000,
    type = 'item',
    image = 'tablet.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'SmartPad'
},

powerbank = {
    name = 'powerbank',
    label = 'Powerbank',
    weight = 200,
    type = 'item',
    image = 'powerbank.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Capacity: 10000mAh | Output: 5V/2.1A | USB Type-C.'
},

weaponlicense = { 
    name = 'weaponlicense', 
    label = 'Weapon License', 
    weight = 0, 
    type = 'item', 
    image = 'weapon_license.png', 
    unique = true, 
    useable = true, 
    shouldClose = true, 
    description = 'Weapon License' 
},

📦 OX Inventory

If you are using OX Inventory, use the following definitions in your ox_inventory/data/items.lua file:

['smartpad'] = {
    label = 'SmartPad',
    weight = 2000,
    stack = false,
    consume = 0,
    unique = true,
    close = true,
    description = 'SmartPad',
    server = {
        export = 'kibra-smartpad.useTablet'
    },
    image = 'tablet.png'
},
    
['powerbank'] = {
    label = 'Powerbank',
    weight = 200,
    stack = false,
    close = true,
    description = 'Capacity: 10000mAh | Output: 5V/2.1A | USB Type-C.',
    server = {
        export = 'kibra-smartpad.usePowerbank'
    },
    image = 'powerbank.png'
},

['wlicense'] = {
    label = 'Weapon License',
    weight = 0,
    stack = false,
    close = true,
    description = 'Weapon License',
    server = {
        export = 'kibra-smartpad.useWeaponLicense'
    },
    unique = true,
    image = 'weapon_license.png',
},

⚠️ Don't forget to assign the appropriate client.export functions according to your implementation.


📷 Camera App Installation

Overview

The Camera App on your tablet captures photos and videos, which are then uploaded and stored securely on fivemanage.com.

To enable upload functionality, each user must obtain a personal API key.


📌 Steps to Get Started

1. Visit the API Key Portal

Go to https://fivemanage.com/developer and sign in with your account.

2. Generate Your API Key

After logging in:

  • Navigate to the API Keys section.

  • Click "Generate New Key".

  • Copy the generated key and store it somewhere safe.

3. Update Your Project Configuration

In your camera.json file (under /shared folder), structure your data as follows:

{
  "photo": "https://fivemanage.com/media/photo1.jpg",
  "video": "https://fivemanage.com/media/video1.mp4",
}

⚠️ Important Notes

  • Do not share your API key with others.

  • If your key is compromised, revoke and regenerate it immediately.

  • Uploaded media is only accessible via authenticated requests.


🧪 Testing Uploads

After configuring your key, try capturing media using the Camera App. You should see files uploaded to https://fivemanage.com/media/.

If any issue occurs, verify:

  • Your API key is correct and active.

  • Your internet connection is stable.


🧬 SQL Setup

All necessary SQL files are installed automatically during the first resource run. You do not need to import anything manually.

✅ Make sure the database connection is properly configured in your server.cfg and qb-core or es_extended or qbx_core.


Installing Dependencies (node_modules)

After placing the kibra-smartpad folder inside your server's resources directory, you must install the required dependencies to ensure the script works correctly.

Steps

  1. Open your terminal and navigate to the script's directory:

    cd resources/kibra-smartpad
  2. Install all dependencies:

    npm install

    This command will automatically create the node_modules folder with all the necessary packages. Never copy node_modules manually. Always use npm install.

  3. (If the script uses a frontend/build step) Build the project:

    npm run build

    The build folder is usually included. If you get errors about missing build files, run this command.


If you see any errors about missing modules, just run npm install and try again.

🔧 Dependencies & Start Order

To ensure the SmartPad script works properly, 0r_lib must be installed on your server.

✅ Required Start Order in server.cfg:

ensure yourcore
ensure oxmysql
ensure 0r_lib
ensure ox_lib
ensure kibra-smartpad

📌 Always start 0r_lib before kibra-smartpad to prevent any missing export errors.


🔌 Optional Compatible Scripts

SmartPad is also compatible with the following scripts, offering additional integration:

  • 0R Housing – House-related app support for SmartPad.

  • Wais Bodycam V2 – EMS/Police bodycam viewer integration.

Last updated