[FREE] Discord permission system

image

A lightweight permissions system for FiveM servers to manage role-based permissions efficiently.

Features

  • Easy permission checking

  • Supports single and multiple permission checks

  • Integrates seamlessly with FiveM’s ACE system

  • Optional discord membership requirement with adaptive card

  • Optional age verification

Installation

  1. Download and add the scully_perms resource to your server’s resources folder.

  2. Add the following lines to your server.cfg:


ensure scully_perms

add_ace resource.scully_perms command.add_principal allow

add_ace resource.scully_perms command.remove_principal allow

  1. Restart your server.

Preview

image

Usage

You can verify if a player has specific permissions using the provided exports. These can be called from other resources.

Single Permission Check

Check if a player has a single permission.


if exports.scully_perms:hasPermission(source, 'permission') then

print('Has permissions!')

else

print('Does not have permissions!')

end

Multiple Permission Check

Check if a player has all or some of the specified permissions:


if exports.scully_perms:hasPermission(source, {'permission1', 'permission2', 'permission3'}) then

print('Has permissions!')

else

print('Does not have permissions!')

end

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Download: GitHub

7 Likes

Good job Scully!

1 Like

Updated

  • Made improvements to the permission system.

This is a server sided command, you can’t use it within a client file.

Updated:

  • Added support to use multiple roles for each permission in the config.

[ script:scully_perms] SCRIPT ERROR: @scully_perms/server/main.lua:59: attempt to index a nil value (local ‘user’)

What is this error?

what if you have more then 1 set role but there are 2 diffrent groups set for it.

[owner] = ‘4786537’,

[admin] = ‘5782757’,

what if im haveing both roles but i want to be in owner group ??

Resource has been updated with an optional member requirement along with an optional age verification requirement.