Documentation › Hunting System › Integrations › Permissions

Permissions

Replace the admin and police checks with your own system.

Both checks live in bridge/server/permissions.lua.

Bridge.IsAdmin(src)

Used for the admin panel, /huntlegend and admin-only actions. Returns true when the player's identifier is in Config.Admins, they have the ACE from Config.AdminAce, or they are an ESX admin / superadmin or QBCore admin / god.

Bridge.IsPolice(src)

Used for poaching alerts and /huntlicense. Returns true for jobs in Config.Police.jobs (on duty when requireDuty = true).

Example: police by job type

lua
function Bridge.IsPolice(src)
    local player = exports.qbx_core:GetPlayer(src)
    local job = player and player.PlayerData.job
    return job ~= nil and job.type == 'leo' and job.onduty
end