MDT Configuration

This configuration file defines how different jobs (roles) can interact with the MDT (Mobile Data Terminal) system and the specific permissions they have within it. You can enable or disable various features for each job, as well as define which grades within each job have access to edit and manage different sections of the MDT.

Config.MDT = {
    -- Enable or disable the use of the new MDT.
    -- true: use the new MDT system. false: use the old system (if available).
    newMdt = true,

    -- List of jobs allowed to access the MDT, with specific permissions and configurations.
    JobsAllowedToMDT = {

        -- Configuration for the "police" job.
        ["police"] = {
            -- Permissions for ranks (grades) within the police job that can edit information in the MDT.
            gradesAllowedToEdit = {
                [0] = true,  -- Rank 0: Permission to edit
                [1] = true,  -- Rank 1: Permission to edit
                [2] = true,  -- Rank 2: Permission to edit
                [3] = true,  -- Rank 3: Permission to edit
                [4] = true,  -- Rank 4: Permission to edit
                ['recluit'] = true,    -- Recruit: Permission to edit
                ['officer'] = true,    -- Officer: Permission to edit
                ['sergeant'] = true,   -- Sergeant: Permission to edit
                ['lieutenant'] = true, -- Lieutenant: Permission to edit
                ['boss'] = true        -- Boss: Permission to edit
            },

            -- Configuration of the categories within the MDT that police can access.
            categoryes = {
                -- "citizens" category: Allows managing licenses, tags, and viewing vehicles and houses.
                ['citizens'] = {
                    enabled = true,          -- Enabled for police
                    CanManageLicences = true, -- Can manage licenses
                    CanManageTags = true,     -- Can manage tags
                    CanViewVehicles = true,   -- Can view vehicle information
                    CanViewHouses = true      -- Can view house information
                },
                -- "incidents" category: Allows managing and viewing incidents.
                ['incidents'] = {
                    enabled = true -- Enabled for police
                },
                -- "bolos" category: Allows managing and viewing BOLOs (Be On the Look Out).
                ['bolos'] = {
                    enabled = true -- Enabled for police
                }
            },

            -- Licenses that police can manage within the MDT.
            availableLicences = {
                "driver",   -- Driver's license
                "drive",    -- Driving license
                "weapon",   -- Weapons license
                "aircraft"  -- Aircraft license
            },

            -- Additional jobs that police can query in the MDT database.
            readDatabaseFor = {
                "mechanic",  -- Mechanic
                "ambulance"  -- Ambulance
            }
        },

        -- Configuration for the "mechanic" job.
        ["mechanic"] = {
            -- Edit permissions for grades within the mechanic job.
            gradesAllowedToEdit = {
                [4] = true,   -- Rank 4: Permission to edit
                ['boss'] = true -- Boss: Permission to edit
            },

            -- Categories accessible by mechanics.
            categoryes = {
                ['citizens'] = {
                    enabled = true,           -- Enabled for mechanics
                    CanManageLicences = false, -- Cannot manage licenses
                    CanManageTags = false,     -- Cannot manage tags
                    CanViewVehicles = false,   -- Cannot view vehicles
                    CanViewHouses = false      -- Cannot view houses
                },
                ['incidents'] = {
                    enabled = true -- Enabled for mechanics
                },
                ['bolos'] = {
                    enabled = true -- Enabled for mechanics
                }
            }
        },

        -- Configuration for the "ambulance" job.
        ["ambulance"] = {
            -- Edit permissions for grades within the ambulance job.
            gradesAllowedToEdit = {
                [3] = true,  -- Rank 3: Permission to edit
                [4] = true,  -- Rank 4: Permission to edit
                ['chief_doctor'] = true, -- Chief doctor: Permission to edit
                ['boss'] = true          -- Boss: Permission to edit
            },

            -- Categories accessible by the ambulance job.
            categoryes = {
                ['citizens'] = {
                    enabled = true,           -- Enabled for ambulance
                    CanManageLicences = false, -- Cannot manage licenses
                    CanManageTags = false,     -- Cannot manage tags
                    CanViewVehicles = false,   -- Cannot view vehicles
                    CanViewHouses = false      -- Cannot view houses
                },
                ['incidents'] = {
                    enabled = true -- Enabled for ambulance
                },
                ['bolos'] = {
                    enabled = true -- Enabled for ambulance
                }
            }
        }
    }
}

General Explanation

  • newMdt: This option enables the new MDT system. If set to true, the new version of the MDT system is used.

  • JobsAllowedToMDT: Specifies which jobs can access the MDT, and within each job, defines which grades can edit and what categories they have access to.

  • gradesAllowedToEdit: List of ranks or grades within each job that have permission to edit information in the MDT.

  • categoryes: Defines the available categories in the MDT, such as citizens (citizens), incidents (incidents), and bolos (BOLOs), and whether the jobs can manage or just view them.

  • availableLicences: List of licenses that can be managed within the MDT.

  • readDatabaseFor: Additional jobs whose information can be queried by other jobs (e.g., police) in the MDT database.

Last updated