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

Last updated

Was this helpful?