Permission Check
A function which checks if player is allowed to open the adminitem menu, i.e. checks if player is admin. How you can adapt the function for other framework example.
VORP
SConfig.PermissionCheck = function(source)
local user = Core.getUser(source)
if not user then return false end
if user.getGroup == "admin" then
return true
end
return false
end
QBCORE
SConfig.PermissionCheck = function(source)
return QBCore.Functions.HasPermission(source, 'admin')
end
Standalone
This will work for all frameworks no matter if FiveM or RedM.
SConfig.PermissionCheck = function(source)
return IsPlayerAceAllowed(source, 'command')
end
This will give anyone with command ace, such as group.admin
permission.
You can give someone group.admin
by putting the following at the bottom of your server.cfg
:
add_principal identifier.license:958141767e2fdc8ac7824e4dc2e group.admin
Last updated
Was this helpful?