Closed SrPeterr closed 2 years ago
There's the AutoAcePermissions where if a role is set in discord the user on login will be given an ace permission on the server. that what you mean? or do you mean actually givinging them a permissions like mod, admin or god?
It would be something like giving them mod, admin or god. Currently in QB there is, user, admin or god I think but I want to create a new rank, like VIP. user, vip, admin and god
I'd suggest using FiveM's acePerms system rather than qb's permission system which is planned to be phased out in favor of ace perms:
Info: https://cookbook.fivem.net/2021/07/17/quick-note-on-using-built-in-acl-security/ https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917
Hmmm, the thing is right now I think It would be easier for some scripts to use QB, for example I cant restrict some command for only the "vip" rank or accessing a shop
Yeah you can, fairly simply too. chat commands support ace perms by default and checking if a source has permission is a simple one liner without any dependency on imports like qbcore. a simple
if IsPlayerAceAllowed(src, 'viprank') then
-- Special code
end
and as a chat command
RegisterCommand('special', function(source, args, rawCommand)
-- Special command code to run
end, 'viprank')
Those are FiveM natives
FiveM's acePerms the way to go man, screw qb's perms system.
Ohh, will do this, thank you!!
And in the config.js file should be:
const EnableAutoAcePermissions = true;
const AutoAcePermissions = {
"eclub": "ROLE_ID",
};
And the I have a command like:
RegisterCommand('vip', function(src)
if IsPlayerAceAllowed(src, 'eclub') then
TriggerClientEvent('QBCore:Notify', src, "VIP", "success")
else
TriggerClientEvent('QBCore:Notify', src, "Not VIP", "error")
end
end, 'eclub')
With this config, it is showing me that I have not VIP, but I do have that role :/
The resources I linked go over ace perms in better detail. one thing that trips people up (even me) is permissions vs groups (add_ace vs add_principal)
Question: Hi! I'm not sure if this is possible, but my plan is that when they buy a package on tebex they are granted a role, VIP. This role in the server should have the rank vip, normally the command would be /addpermission ID (group)
Information: FiveM artifact #: 5371 Using QBCore?: yes When did you last update QBCore if you are using it?: This week