FivemDiscordPermissions
This resource is a better alternative to other discord ace permission scripts like the popular DiscordAcePerms. Unlike other discord ace permission scripts, this allows you to use multiple discords to give ace permissions and does not have any other dependencies.
An example use case for this would be if your server uses different discords for different departments and you want to give people in-game permissions based off of roles in the department discords. Currently, you would solve this by cluttering your main discord with random roles, but with this resource, you can just you the roles already made in the department discord.
Features
- Give ace permissions based on discord roles
- Able to use multiple discords to give ace permissions
- No dependencies
- updateperms command that updates an in game users permissions. Useful if a user received a new role while in game and doesn’t want to relog.
Download
Install Guide
- make sure you have “developer mode” enabled on your discord account
- dowload this repository
- have a discord bot created
- if you don’t know how to make one use this website (https://www.upwork.com/resources/how-to-make-discord-bot)
- under step 9 for simplicity sake you can just give the bot the administrator permission
- make sure that discord bot is in every discord that you want to have permissions for
- drag the FivemDiscordPermissions-main into the
resources
folderor a subfolder
of the resource folder - change the file name to
FivemDiscordPermissions
- add the following to your server.cfg
start FivemDiscordPermissions
add_ace resource.FivemDiscordPermissions command.add_principal allow
add_ace resource.FivemDiscordPermissions command.remove_principal allow
- open the config.json and add your discord bots bot token
"BOT_TOKEN": "Your token goes here"
- open the permissions.js file
- in the file you will see the format to use but I will restate it here
["GUILD_ID_HERE"]: {
"ROLE_ID_HERE": "PERMISSION GROUP",
},
- all you need to do is copy and paste the format for as many discords as you have and remove the
//
in front of each line - now just fill in the blanks
- to get the guild ID of a discord server right click on the server icon and click copy ID at the bottom
- to get the role ID of a discord role open the server setting → click on roles → right click on the role → click copy ID
- an example of a completed permission.js file should look something like this
const permissions = {
// ["GUILD_ONE_ID_HERE"]: {
// "ROLE_ID_HERE": "PERMISSION GROUP",
// "ROLE_ID_HERE": "PERMISSION GROUP",
// },
["723210193214767121"]: {
"714607086562181280": "group.staff",
"718723931682373663": "group.donator",
},
["714606988675252241"]: {
"748236405389394030": "group.lspd",
"735948035187802192": "group.supervisor",
"714607075027714049": "group.subdivisionname",
},
["714940271074213891"]: {
"714607084485738507": "group.bcso",
},
}