Permission Checks

We've added support for permission checks for the /grappler command, including ace permissions and QB-Core/ESX/vRP straight out of the box.

To begin, navigate to the config.lua and to the grapplerCommand = { section. This is where you'll setup permissions for the grappler command.

Ace Permissions

acePermissions = {
            enabled = false,
            -- This enables ace permissions on the grappler command
},

This first section determines if you want to enable ace permissions on the command. This means that the command will be restricted to those that have the ace permission which would be command.grappler allow.

For a guide on Ace Permissions, see this one here on the FiveM forum.

An example of how to give out this Ace Permission in the server.cfg is:

add_ace group.admin command.grappler allow

This would give the admin group the command.grappler ace, allowing them to use /grappler.

Many servers often use an Ace Permissions resource that links in with Discord permissions, you should be able to easily set this up with that as well, by giving people the right ace permission in the config of that other resource. We can provide assistance to a degree if you experience problems.

ESX / vRP / QB-Core

We've added support for these frameworks right out of the box, see the following information on configuring these for each command.

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

This section allows you to enable the ESX integration for this command only. For ESX, we've added a job check and you can enable this by setting enabled to true in the checkJob section.

The jobs = {} table allows you to name jobs where a player can have any of them to use the command. Each job should be separated by a comma and wrapped in speech marks "".

vRP = {
            enabled = false,
            checkGroup = {
                enabled = false, -- Enable this to use vRP group check
                groups = {"fire", "admin"}, -- 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 = {"player.kick"} -- A user can have any of the following permissions, allowing you to add multiple
            },
},

Similar to the ESX section, you can enable vRP integration for this command only by setting enabled to true.

For vRP however, you can either check for groups, permissions or even both. A user can have any permission specified (if enabled) and also any group specified (if enabled) to use the command.

You can enable groups by setting enabled to true in the checkGroup section and the same for permissions by setting enabled to true in the checkPermission section.

Groups and permissions are both defined in tables and must be separated by a comma, with each permission or group wrapped in speech marks "".

QBCore = {
            enabled = false,
            checkJob = {
                enabled = false, -- Enable this to use QBCore job check
                jobs = {"fire"}, -- 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 = {"god"}, -- A user can have any of the following permissions, allowing you to add multiple
            },
},

To enable QB-Core integration, simply set enabled to true.

You can either check for jobs, permissions or even both. A user can have any permission specified (if enabled) and also any job specified (if enabled) to use the command.

To enable the job check, set enabled to true in the checkJob section and the same for permissions, by setting enabled to true in the checkPermission section.

Jobs and permissions are both defined in tables and must be separated by a comma, with each permission or job wrapped in speech marks "".

Last updated