It does, you just have it set up improperly lmao
You literally edited the code… Do not edit anything under “-- Code --” as you don’t know what you are doing code-wise.
so change all the webhooks back to nill?
because that is the only thing I have edited under “–Code–”
Yes as you don’t know how code works, don’t touch any of it
then how can i get it to work with my discord then? or does it auto get it from discord_perms
alright it pops up in chat now but still says I am not in the discord.
I finally figured it out. for those who is having trouble add your role to discord_perms config.lua then copy those same ids to PoliceEMSActivity sv lua and only change this.
roleList = {
['👮 LSPD | '] = {581881252907319369, 2, nil},
['👮 Sheriff | '] = {577622764618383380, 17, nil},
['👮 SAHP | '] = {506276895935954944, 3, nil},
['👨🚒 Fire/EMS | '] = {577635624618819593, 1, nil},
['🎖️ NG | '] = {609828128432586752, 5, nil},
}
to something similar but with what you need. it works like a charm.
roleList = {
['👮 LEO | '] = {659602976318423050, 3, 'webhook'},
['👨🚒 Fire/EMS | '] = {659603066948943872, 1, 'webhook'},
}
Sample discord_perms config.lua
Config = {
DiscordToken = "Token Here",
GuildId = "GuildID Here",
-- Format: ["Role Nickname"] = "Role ID" You can get role id by doing \@RoleName
Roles = {
["Admin"] = "647533757397467157",
["Moderator"] = "657312695711957015",
["FiveM"] = "651612345801506826",
["PD"] = "659602976318423050",--
["FD"] = "659603066948943872",--
-- This would be checked by doing exports.discord_perms:IsRolePresent(user, "TestRole")
}
}
You must have one of the roles to use the command. Your discord may not be getting detected by Fivem.
It must be the discor_perms but I have every set up correctly. maybe because my bot isnt online?
Remove your webhook links. You don’t want someone trying to spook you by sending “I hacked you” lol
i did what dracuslayer did with the webhook in the nil and /duty doesnt do anything now
Great script, Would be good if you released a version of this for Staff Members.
Thanks changed to webhook I forgot to do that
I did what you did, how come it didnt work for me?
Did u give ur self the tag and restart the server it’s one of those scripts that require full restart of server
Hi Badger, this is an awesome release. However, it keeps coming up with “You must be an LEO on our discord to use this” even though my Discord Perms are setup correctly as they work fine in other resources. I’ve double checked to see if rolelist is setup correctly, and it’s correct. I’m really not sure. However it worked one time i joined, but not since.
You must have one of the roles defined to be able to use the command. If you do not have a role, then it won’t allow you to use the command.
10/10 Badger is the best at making FiveM scripts.
what do I put for guild id? Is it the discord server id? Thanks