Documentation as well as updates to this resource have been moved to: https://docs.badger.store/fivem-discord-scripts/discordchatroles
CURRENT VERSION: 7.0
This is a very simple script that uses IllusiveTea's discord_perms for chat roles :slight_smile:
Picture example taken from my RP server:
You must set up IllusiveTea's discord_perms script for this to work properly. ---> https://forum.cfx.re/t/discord-roles-for-permissions-im-creative-i-know/233805
Example of how the chat roles are set up and what you should change:
The 1s should be replaced with IDs of the respective roles in your discord server. (0 should stay for Civilian as it is the default role for all users)
Download DiscordChatRoles from Dropbox
Extract the .zip and place the folder in your /resources/ of your Fivem server
Make sure you add "start DiscordChatRoles" in your server.cfg
My Other Work
Chat colors can now be restricted to certain groups. The color red can also be restricted to only staff ranks!
There is now a StaffChat for your staff members to use:
Permission to use /sc and /staffchat:
Toggle off getting StaffChat messages (good for staff members if they are streaming their own RP)
You can now change your chat-tags with the in-game command using /chattag and /chattag [id]
You can now change your chat-color when you talk in-game using /cc or /chatcolor
/cc - List out the chat colors you have access to
/chatcolor - List out the chat colors you have access to
/chatcolor <id> - Change chatcolor to the ID specified
/cc <id> - Change chatcolor to the ID specified
How it works?
You basically set this up using a config in which the keys are the permission ACE value that gives them access to see and use those chat colors.
Config (you'll have to find this in server.lua, in a future version I'll move it to the top though):
Following the format of the config, you can add multiple different permission for chat colors and set up a vast variety of different pattern combinations!
I hope you all enjoy! Merry Christmas to all! :)