License Demerits

A license demerit system.

Info

This resource automatically handles license removal and reinstation based on configured values.

You can configure any license type to be automatically revoked after a certain number of demerit points have been incurred, and you can also further configure each license to be automatically reinstated (or not) after the number of demerits have been reduced (automatically or otherwise) to an acceptable level.

NOTE: Export calls are required for this resource to actually do anything. There is no method for incurring demerit points by default, you must implement them as you please, for example, by calling:

exports.ti_licenseDemerits:addDemerit(player, licenseType, demeritCount)

Setup

Dependencies

  • If using QB-Core, licenses must be defined as items.

  • If using ESX, esx_license is required.

Installation

  1. After purchasing the resource, download it from your keymaster.

  2. Extract the resource into your servers resources folder.

  3. Add start ti_licenseDemerits to your server.cfg, below start ti_utils.

  4. Execute the sql statement file found below, or at ti_licenseDemerits/[sql]/license_demerits.sql.

  5. Observe the server console on start-up for potential errors or warnings.

SQL

CREATE TABLE IF NOT EXISTS `license_demerits` (
  `owner` varchar(60) NOT NULL DEFAULT '',
  `demerits` longtext NOT NULL DEFAULT '[]',
  PRIMARY KEY (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Config

Usage

  • All server-side exports are documented here.

Last updated