# Add jobs

Adding new jobs to rcore\_dispatch is straightforward. Navigate to `configs/sh_config.lua` and modify the `CONFIG.JOBS` table to include your new job.

## Job Configuration Structure

```lua
CONFIG.JOBS = {
    ['police'] = {
        Jobname = 'police', -- The name used by the framework to recognize the job.
        GlobalFrequency = 900, -- The frequency used for the global radio, this value should be unique for each job. If you are not using the dispatch radio just leave it.
        Ispolice = true, -- Specify if the job is the police one.
        Ranks = { -- Include every job rank, each rank  has an index that should correspond with the integer used by the framework to recognize each one.
            [0] = 'Recruit',
            [1] = 'Officer',
            [2] = 'Sergeant',
            [3] = 'Lieutenant',
            [4] = 'Captain',
        },
        Blips = { -- Each vehicle type has a blip, and no vehicle is equals to 'none'. Every icon should be an svg.
            ['automobile'] = 'https://cdn.discordapp.com/attachments/966004293041807362/1092758148515934218/police-car.svg',
            ['bike'] = 'https://cdn.discordapp.com/attachments/966004293041807362/1096442349132492841/motorbike.svg',
            ['heli'] = 'https://cdn.discordapp.com/attachments/966004293041807362/1092757648830511155/helicopter.svg',
            ['none'] = 'https://cdn.discordapp.com/attachments/966004293041807362/1087954256911675483/police-hat.svg'
        },
        Perms = { -- From the previous roles specified, you should include which ones of them have perms to interact with the draws or other things.
            ['Captain'] = true
        },
        Units = { -- The units of each job, you should include the unit name and the radio frequency that each unit will use.
            { 'H-50',    801, false },
            { 'Adam-10', 802, false },
            { 'Adam-20', 803, false },
            { 'TAC',     804, true } -- The true/false here specifies if the channel is TAC (TAC means that global radio will not affect the players in this channel, you will not listen or emit to the global radio)
        }
    }
}
```

## Parameter Explanations

| Parameter         | Type    | Description                                                                |
| ----------------- | ------- | -------------------------------------------------------------------------- |
| `Jobname`         | string  | Exact job name used by your framework (ESX, QBCore, etc.)                  |
| `GlobalFrequency` | number  | Unique radio frequency for global communications                           |
| `Ispolice`        | boolean | Set to `true` only for the main police job                                 |
| `Ranks`           | table   | All job ranks mapped to framework grade levels                             |
| `Blips`           | table   | SVG icons for different vehicle types and on-foot                          |
| `Perms`           | table   | Which ranks have administrative permissions to draw or move users to units |
| `Units`           | table   | Available radio units with frequencies and TAC settings                    |

## Example: Adding Security Job

```lua
['security'] = {
    Jobname = 'security',
    GlobalFrequency = 1000,
    Ispolice = false,
    Ranks = {
        [0] = 'Guard',
        [1] = 'Senior Guard',
        [2] = 'Team Leader',
        [3] = 'Supervisor',
        [4] = 'Manager',
    },
    Blips = {
        ['automobile'] = 'https://example.com/security-car.svg',
        ['bike'] = 'https://example.com/security-bike.svg',
        ['none'] = 'https://example.com/security-badge.svg'
    },
    Perms = {
        ['Manager'] = true,
        ['Supervisor'] = true
    },
    Units = {
        { 'SEC-1', 1001, false },
        { 'SEC-2', 1002, false },
        { 'PATROL', 1003, false },
        { 'COMMAND', 1004, true }
    }
}
```

## Important Notes

* **Rank Numbers**: Must match your framework's grade levels exactly
* **Frequencies**: Each job needs a unique `GlobalFrequency`
* **Icons**: Must be SVG format and publicly accessible
* **TAC Channels**: When set to `true`, units won't hear global radio

## Troubleshooting

**If dispatch doesn't run correctly, doesn't appear, or shows "missing rank" errors:**

* **Missing Ranks**: You must add ALL ranks that exist in your framework's job configuration. If your framework has grades 0-5, you must define ranks \[0] through \[5] in the `Ranks` table.
* **Job Name Mismatch**: Ensure `Jobname` exactly matches your framework's job name
* **Invalid Icons**: Check that all SVG URLs are accessible
* **Duplicate Frequencies**: Make sure `GlobalFrequency` is unique across all jobs


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_dispatch/add-jobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
