Permissions

config/permissions.lua
Config.JobCategory = {
    ["police"] = {
        {
            name = "police",
            titleListLabel = "Police List",
            color = "#3f5ba1",
            badge = "lspd_badge", -- only exist lspd_badge and bcsd_badge please don't add other badges name
            penalFilter = "police" -- The name of the penal code filter to separate the penal code by job
        },
        {
            name = "sheriff",
            titleListLabel = "Sheriff List",
            color = "#a1823f",
            badge = "bcsd_badge", -- only exist lspd_badge and bcsd_badge please don't add other badges name
            penalFilter = "police" -- The name of the penal code filter to separate the penal code by job
        },
    },
    ["ambulance"] = {
        {
            name = "ambulance",
            titleListLabel = "Ambulance List",
            color = "#bf3737",
            badge = "bcsd_badge", -- only exist lspd_badge and bcsd_badge please don't add other badges name
            penalFilter = "ambulance" -- The name of the penal code filter to separate the penal code by job
        },
    },
}

Here are the jobs that have permission to perform script actions, the jobs are divided by categories, the police category contains all the police jobs that are on the server. Each job has the property of titleListLabel, which is the title that appears in the agent management list, color, which is the color that is associated with it in the dispatch, badge, which is the badge that will be received when it is generated, and penalFilter, which is a different so that each job can have a different penal code separated from the other jobs.

Config.BossGrade = { 4 }  -- ONLY ESX, set the grades that will be considered as boss and will have more permissions like manage penal code

This option is only used in ESX, to identify the ranks that are considered boss, so that they can perform actions such as managing the penal code.

Config.Permissions = {
    ["police"] = {
        --Tabs
        Dispatch = 1,
        SearchCitizen = 1,
        SearchReports = 1,
        SearchVehicles = 1,
        CriminalCode = 1,
        SearchCapture = 1,
        SearchDebtors = 1,
        FederalManagement = 1,
        AgentManagement = 4,
        SecurityCamera = 1,
        Radio = 1,
        TimeControl = 1,
    
        -- DISPATCH
        MovePlayerInRadio = 4,
        EnterRadioFreq = 1,
        SendRadioMessage = 1,
        AddNotesToAlert = 1,
        AssignAlertToUnit = 3,
    
        -- SEARCH CITIZEN
        SetWanted = 4,
        SetDanger = 1,
        CreateNotes = 1,
        PinNotes = 4,
        DeleteNotes = 4,
        CreateBill = 1,
        DeleteBill = 4,
        AddLicenses = 4,
        DeleteLicenses = 4,
    
        -- REPORTS
        CreateReport = 1,
        AddPeopleToReport = 1,
        AddBillReport = 1,
        RemovePeopleFromReport = 1,
        AddEvidence = 1,
        DeleteEvidence = 1,
        AddReportAgent = 1,
        AddTags = 1,
        RemoveTags = 1,
        AddVictimToReport = 1,
        AddVehicleToReport = 1,
        DeleteReport = 3,
    
        -- AddFederal
        AddFederal = 1,
    
        -- SecurityCameras
        SeeBusinessCameras = 3,
        SeeVehicleCamera = 1,
        SeeBodyCams = 1,
    
        -- PoliceManagement
        GenerateBadge = 4,
        AddPolice = 4,
        ChangePoliceGrade = 4,
        ChangePoliceBadge = 4,
        AddCondecorate = 4,
        RemoveCondecorate = 4,
        AddDivision = 4,
        RemoveDivision = 4,
        HirePolice = 4,

        -- Shapes
        Operations = 1,
        CreateShape = 1,
        DeleteShape = 1,
    
        -- RIGHT MENU
        RadialCommunicationTab = 1,
        RadioTab = 1,
        InteractTab = 1,
        HolsterTab = 1,
        ObjectPlacementTab = 1,
        CanTackle = 1,
    }
}

Here we have the list of permits, the indices refer to the job and not the category of the job, each range refers to the minimum degree that must be had in order for the action to be carried out. For example, only agents with a rank equal to or greater than 4 can enter the AgentManaget.

Last updated