Browse docs
Permissions
How Sky detects admins
Every admin command (/revive, /setboss, /hospitalcreator, …) calls Sky.FW.IsAdmin(src). That function asks your framework whether the player belongs to one of the groups listed in Config.AdminGroups in sky_base/config/config.lua:
Config.AdminGroups = {
"god",
"superadmin",
"admin"
}
If the check returns false, the command responds with a "No permission" notification. Fixing that means putting the player into one of the listed groups the way your framework expects it.
Framework setup
QBox (principal prefix: group.)
Qbox relies on FiveM ACE through ox_lib's lib.addCommand({ restricted = 'group.admin' }). Use the group.<name> prefix — there is no qbox. prefix. The legacy qbx_core:HasPermission export is deprecated since qbx_core v1.8.0.
Add the following to your server.cfg (or permissions.cfg):
add_ace group.admin command allow
add_principal identifier.license:<license> group.admin
Replace <license> with the player's license. Find it via txAdmin, the console players list, or the players DB table.
After editing server.cfg, run refresh and load permissions in the console — or restart the server — before the player reconnects.
Reference: Qbox txAdmin permissions recipe.
QBCore (principal prefix: qbcore.)
QBCore.Functions.HasPermission wraps FiveM ACE, and QBCore registers its principals under the qbcore. prefix. The official docs state:
qbcore.god and group.admin share the same permissions — you can use either one.
In practice the group.* alias is not always wired up depending on QBCore version and the state of your permissions.cfg. Prefer the qbcore.* prefix — it works consistently.
add_ace qbcore.god command allow
add_principal identifier.license:<license> qbcore.god
add_principal identifier.license:<license> qbcore.admin
Or, if an existing admin is already online, use the built-in command in-game:
/addpermission 1 god
…where 1 is the target player's server ID. Granting god implies admin and mod.
group.admin alone on QBCore. If /setboss says "no permission" after setting group.admin, switch to qbcore.admin / qbcore.god.ESX Legacy (users.group)
ESX Legacy stores the admin group on the users.group DB column. Default groups are user, admin, superadmin.
In-game (requires an existing admin):
/setgroup 1 admin
Or via SQL:
UPDATE users SET `group` = 'admin' WHERE identifier = 'license:<license>';
The player must reconnect for xPlayer.getGroup() to pick up the new value.
References: ESX /setgroup, ESX principals.
vRP
Groups are defined in cfg/groups.lua and granted with:
vRP.addUserGroup(user_id, "admin")
Use the admin command that ships with your vRP build (typically in a vRP base menu).
Custom admin groups
If you use groups outside the default set (for example owner, support, dev), add them to Config.AdminGroups:
Config.AdminGroups = {
"god",
"superadmin",
"admin",
"owner",
}
Then grant the group the same way as above (e.g. add_principal identifier.license:<license> group.owner on Qbox).
Per-command overrides
Ambulance ships with a Config.CommandPermissions table that lets you restrict individual commands to a subset of admin groups:
Config.CommandPermissions = {
revive = { "god", "superadmin", "admin" },
stopdeathtimeout = { "god", "superadmin", "admin" },
refunds = { "god", "superadmin", "admin" },
hospital_beds = { "god", "superadmin", "admin" },
hospitalcreator = { "god", "superadmin", "admin" },
removemobilityaid = { "god", "superadmin", "admin" },
kill = { "god", "superadmin", "admin" },
}
If a command name is present in this table, the listed groups take precedence over the default Sky.FW.IsAdmin check. Remove a command from the table to fall back to Sky.FW.IsAdmin.
Activating the boss menu with /setboss
Once your admin group is working, run /setboss to grant every permission (boss menu, wholesale, vehicle shop, member management, …) to a specific job grade. For ambulance with a top grade of 4:
/setboss ambulance 4
This writes Permission.ALL to the sky_job_permissions row for that job and grade. Only run it once per fresh install or after wiping sky_job_permissions.
See the Commands page for the full admin command list.
Troubleshooting
::accordion-item{label="Command says "No permission""}
Group not set, typo in the principal, or wrong prefix for your framework. QBCore wants qbcore.admin; Qbox wants group.admin. Double-check the framework section above.
::
The player must reconnect after the change. On server.cfg edits, also run refresh + load permissions in the console or restart the server.
Add it to Config.AdminGroups in sky_base/config/config.lua, then grant the group the same way (e.g. add_principal ... group.owner on Qbox).
Grade mismatch. The grade you passed to /setboss must match the value in sky_job_members.grade for that employee. Check the DB, or use the highest grade configured for the job.
sky_jobs_base is not running. It must start before sky_ambulancejob in server.cfg.
Switch to qbcore.admin / qbcore.god. The group.* ↔ qbcore.* alias is not reliable across QBCore versions.
Support
Need help? Our support team is always ready to assist
Join Discord