Configuring permissions

Enabling an Inventory

inventory = {
    itemName = "saleboard",
    itemEnabled = false,
    oxInventory = false,
    qbInventory = false,
    esxInventory = false,
    vRPInventory = false,
    quasarInventory = false, -- Enable QB/ESX below aswell
    coreInventory = false, -- Enable QB/ESX below aswell
}

When enabling the inventory you wish to use, change "false" to "true" to activate the inventory you're using.

Enabling a framework

jobCheck = {
    ESX = {
        enabled = false,
        checkJob = {
            enabled = false, -- Enable this to use ESX job check
            jobs = {"mechanic"} -- A user can have any of the following jobs, allowing you to add multiple
        }
    },
    
        vRP = {
        enabled = false,
        checkGroup = {
            enabled = false, -- Enable this to use vRP group check
            groups = {"mechanic"}, -- A user can have any of the following groups, meaning you can add different jobs
        },
        checkPermission = {
            enabled = false, -- Enable this to use vRP permission check
            permissions = {"mechanic.clamp"} -- A user can have any of the following permissions, allowing you to add multiple
        },
    },
    
        QBCore = {
        enabled = false,
        checkJob = {
            enabled = false, -- Enable this to use QBCore job check
            jobs = {"mechanic"}, -- A user can have any of the following jobs, meaning you can add different jobs
        },
        checkPermission = {
            enabled = false, -- Enable this to use QBCore permission check
            permissions = {"mechanic.clamp"}, -- A user can have any of the following permissions, allowing you to add multiple
        },
    },
}

We've included some default frameworks in this script, such as ESX, QBCore, and vRP.

ESX Framework

To enable the ESX framework change "enabled = false" to "enabled = true" on both lines. You can then change the "jobs = {"mechanic"} to the job you wish to have access to this. An example is shown below.

  ESX = {
        enabled = true,
        checkJob = {
            enabled = true, -- Enable this to use ESX job check
            jobs = {"mechanic"} -- A user can have any of the following jobs, allowing you to add multiple
        }
    },

vRP Framework

To enable vRP you want to follow the same style as ESX by enabling the framework to change "false" to "true" and then you can pick from "checkGroup" or "checkPermission" Depending on how you have your setup you can choose either. Then you can change the group name or the permissions name to whatever one you need. An example is shown below.

        vRP = {
        enabled = true,
        checkGroup = {
            enabled = true, -- Enable this to use vRP group check
            groups = {"mechanic"}, -- A user can have any of the following groups, meaning you can add different jobs
        },
        checkPermission = {
            enabled = false, -- Enable this to use vRP permission check
            permissions = {"mechanic.clamp"} -- A user can have any of the following permissions, allowing you to add multiple
        },
    },

QBCore Framework

When enabling the QBCore framework change the enabled to true and you can pick between "checkJob" or "checkPermission" You can also then change the job name {"mechanic"} to whichever job name you wish to have or change the permissions name {"mechanic.clamp"} to whatever the permission name is you need.

        QBCore = {
        enabled = true,
        checkJob = {
            enabled = false, -- Enable this to use QBCore job check
            jobs = {"mechanic"}, -- A user can have any of the following jobs, meaning you can add different jobs
        },
        checkPermission = {
            enabled = false, -- Enable this to use QBCore permission check
            permissions = {"mechanic.clamp"}, -- A user can have any of the following permissions, allowing you to add multiple
        },
    },

Last updated