> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_mdt/configuration/add-jobs.md).

# Add Jobs

Every job that can use the MDT is a department in `CONFIG.JOBS` inside `configs/sh_config.lua`. You can add as many as you need.

The default config includes:

| Job         | Department                 | Type      |
| ----------- | -------------------------- | --------- |
| `police`    | Police Department          | `law`     |
| `sheriff`   | Sheriff Department         | `law`     |
| `ambulance` | Emergency Medical Services | `medical` |
| `mechanic`  | Mechanic                   | `service` |

{% hint style="danger" %}
The MDT does not create jobs or grades. Each key in `CONFIG.JOBS` must match a job that already exists in your framework. If it doesn't, players with that job cannot open the MDT.
{% endhint %}

## ➕ Add a Job

{% stepper %}
{% step %}

### Find your framework job

Note the exact job name, for example `security`, and its grade numbers.
{% endstep %}

{% step %}

### Copy an existing job

Copy one of the existing entries in `CONFIG.JOBS`. Set the key and `Jobname` to your framework job name.
{% endstep %}

{% step %}

### Set the ranks and permissions

Give every grade a name in `Ranks`, then give ranks their permissions in `Perms`.
{% endstep %}

{% step %}

### Set units, screens, and case file categories

Choose the `Units` members can join, turn `Screens` on or off, and set the `CaseFileCategories`.
{% endstep %}

{% step %}

### Restart the resource

Restart `rcore_mdt` and open the MDT with `/mdt` to check the job.
{% endstep %}
{% endstepper %}

## 🏢 Job Options

```lua
CONFIG.JOBS = {
    ['police'] = {
        Jobname            = 'police',
        Label              = 'Police Department',
        Type               = 'law',
        Color              = '#5f82ff',
        Ispolice           = true,
        BulletinGroup      = 'law',
        CaseFileCategories = { ... },
        Ranks              = { ... },
        Perms              = { ... },
        Units              = { ... },
        Screens            = { ... },
    },
}
```

| Option               | Description                                                                                              |
| -------------------- | -------------------------------------------------------------------------------------------------------- |
| `Jobname`            | Job name in your framework. Use the same value as the key.                                               |
| `Label`              | Department name shown in the MDT.                                                                        |
| `Type`               | `'law'`, `'medical'`, `'mechanic'`, or `'service'`. `'medical'` adds a medical tab to civilian profiles. |
| `Color`              | Accent color of the MDT for this job. Use a 6-digit hex color, for example `'#5f82ff'`.                  |
| `Ispolice`           | `true` shows fines on the Home screen and calls members "Officers" instead of "Employees".               |
| `BulletinGroup`      | Jobs with the same group share bulletins and case files.                                                 |
| `CaseFileCategories` | Case file categories. See [Case File Categories](#case-file-categories).                                 |
| `Ranks`              | Rank name for each job grade.                                                                            |
| `Perms`              | Permissions for each rank.                                                                               |
| `Units`              | Units shown in the Active Units panel.                                                                   |
| `Screens`            | Which MDT screens this job can see.                                                                      |

## 🎖️ Ranks

Map each job grade number to a rank name:

```lua
Ranks = {
    [0] = 'Recruit',
    [1] = 'Officer',
    [2] = 'Sergeant',
    [3] = 'Lieutenant',
    [4] = 'Captain',
},
```

The numbers must match your framework's grades. If a grade is missing, permissions are matched against the grade label from your framework instead.

## 🛡️ Rank Permissions

`Perms` gives each rank `'full'` or a list of permissions. `'full'` grants every permission in `CONFIG.Permissions`.

```lua
Perms = {
    ['Captain']    = 'full',
    ['Lieutenant'] = { 'incidents', 'profiles', 'bolos', 'case_files', 'bulletins', 'boards', 'vehicles' },
    ['Sergeant']   = { 'incidents', 'profiles', 'bolos', 'case_files', 'vehicles' },
    ['Officer']    = { 'incidents', 'profiles', 'bolos', 'vehicles' },
},
```

Ranks that are not listed have read-only access. See [Shared Config](https://documentation.rcore.cz/paid-resources/rcore_mdt/configuration/shared-config.md#permissions) for what each permission allows.

{% hint style="warning" %}
Rank names in `Perms` must match the names in `Ranks` exactly.
{% endhint %}

## 🚓 Units

Units appear in the Active Units panel on the Home screen. Members can join and leave units from there.

```lua
Units = { 'Command', 'Adam-10', 'Adam-20', 'TAC' },
```

## 🖥️ Screens

`Screens` controls which screens appear for this job. Set a screen to `false` to hide it. Screens that are not listed are shown.

```lua
Screens = {
    ['home']            = true,
    ['incidents']       = true,
    ['bolos']           = true,
    ['profiles']        = true,
    ['vehicles']        = true,
    ['employees']       = true,
    ['penal-code']      = true,
    ['bulletin-board']  = true,
    ['police-board']    = true,
    ['case-files']      = true,
    ['fines']           = true,
    ['messages']        = true,
    ['settings']        = true,
    ['medical-records'] = false,
},
```

| Screen            | Shows             |
| ----------------- | ----------------- |
| `home`            | Home              |
| `incidents`       | Incidents         |
| `bolos`           | BOLOs             |
| `profiles`        | Civilian profiles |
| `employees`       | Department roster |
| `medical-records` | Medical records   |
| `vehicles`        | Vehicle registry  |
| `penal-code`      | Penal code        |
| `bulletin-board`  | Bulletin board    |
| `police-board`    | Evidence boards   |
| `case-files`      | Case files        |
| `fines`           | Fines             |
| `messages`        | Messages          |
| `settings`        | Settings          |

## 📁 Case File Categories

Case file categories belong to the job's `BulletinGroup`. Jobs in the same group share their categories, so give them the same list. Categories cannot be created in-game, and changes apply on the next restart.

```lua
CaseFileCategories = {
    { id = 'active-cases', name = 'Active Cases', description = 'Currently active investigations and cases', icon = 'alert',  color = '#ef4444', order = 1 },
    { id = 'cold-cases',   name = 'Cold Cases',   description = 'Unsolved cases requiring review',          icon = 'folder', color = '#3b82f6', order = 2 },
},
```

| Field         | Description                                                                   |
| ------------- | ----------------------------------------------------------------------------- |
| `id`          | Unique ID across all groups. Do not change it after topics have been created. |
| `name`        | Category name.                                                                |
| `description` | Short text shown under the name.                                              |
| `icon`        | `alert`, `search`, `folder`, `shield`, or `message`.                          |
| `color`       | Category color.                                                               |
| `order`       | Display order, lowest first.                                                  |

## 🔐 Example: Security Job

A service job that uses incidents, bulletins, and case files, without law enforcement screens.

```lua
['security'] = {
    Jobname            = 'security',
    Label              = 'Security Services',
    Type               = 'service',
    Color              = '#0f766e',
    Ispolice           = false,
    BulletinGroup      = 'security',
    CaseFileCategories = {
        { id = 'sec-jobs',    name = 'Active Jobs',        description = 'Ongoing security contracts',      icon = 'folder',  color = '#3b82f6', order = 1 },
        { id = 'sec-reports', name = 'Incident Reports',   description = 'Reported incidents on site',      icon = 'alert',   color = '#eab308', order = 2 },
        { id = 'sec-general', name = 'General Discussion', description = 'Team updates and general topics', icon = 'message', color = '#6b7280', order = 3 },
    },
    Ranks = {
        [0] = 'Guard',
        [1] = 'Senior Guard',
        [2] = 'Supervisor',
        [3] = 'Manager',
    },
    Perms = {
        ['Manager']    = 'full',
        ['Supervisor'] = { 'incidents', 'case_files', 'bulletins' },
    },
    Units = { 'SEC-1', 'SEC-2', 'PATROL' },
    Screens = {
        ['home']            = true,
        ['incidents']       = true,
        ['bolos']           = false,
        ['profiles']        = false,
        ['vehicles']        = false,
        ['employees']       = true,
        ['penal-code']      = false,
        ['bulletin-board']  = true,
        ['police-board']    = false,
        ['case-files']      = true,
        ['fines']           = false,
        ['messages']        = true,
        ['settings']        = true,
        ['medical-records'] = false,
    },
},
```
