Installation Guide

This comprehensive guide outlines the necessary steps to integrate the QB-Shops system with weapon licenses. Ensure you follow each step meticulously for a successful implementation.

Prerequisites

  • Ensure that your QB-Shops system is up to date with the latest version. This integration requires the use of an updated QB-Shops version.

  • Follow the Below Steps. ⬇️


Step 1: Database Setup

  • Execute the following SQL query to create a new table named weapon_restrict in your database:

    CREATE TABLE `weapon_restrict` (
        `id` INT(11) NOT NULL AUTO_INCREMENT,
        `name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb3_general_ci',
        `uses` INT(11) NULL DEFAULT '0',
        PRIMARY KEY (`id`) USING BTREE
    )
    COLLATE='utf8mb3_general_ci'
    ENGINE=InnoDB
    AUTO_INCREMENT=4
    ;

Step 2: Update Weapons Shop Config

  • In your weapons shop configuration file, add the following lines at the end:

  • Ensure that increaseuse and requiredLicenseItem are set to 'true' and

    { 'weaponlicense' } respectively for the specified weapons.


Step 3: Modify QB-Inventory Code

  • In the qb-inventory/server/main.lua file, find the section containing:

  • Replace it with the provided⬇️ code block.


Step 4: Add Utility Function

  • Add the following function anywhere in the qb-shops/client/main.lua file:


Step 5: Update Shop Product Check

Modify the code block in the same qb-shops/client/main.lua file that checks for required licenses:

  • Replace this

  • With:


Last updated