> For the complete documentation index, see [llms.txt](https://lscripts.gitbook.io/lscripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lscripts.gitbook.io/lscripts/scripts/l-multijob/categories.md).

# Categories

Every row in the F4 menu shows an icon. You can pick those icons, and you can group jobs into named categories that carry their own icon and a label. Both live in `config.lua`.

### Icons

```lua
Config.Categories = {
    standard = 'id-card',
    civ = 'briefcase',
}
```

Icons are [Font Awesome](https://fontawesome.com/icons) names from the free solid set. Use the name without the `fa-` prefix, for example `briefcase`, `user-secret` or `truck`.

| Key        | Used for                                                                       |
| ---------- | ------------------------------------------------------------------------------ |
| `standard` | The standard job row (default `unemployed`)                                    |
| `civ`      | Every job that is in no category, and every job row when classification is off |

{% hint style="info" %}
If you need another style than solid, pass the full class string instead of the bare name, for example `'fa-regular fa-star'`. A value with a space in it is used as is.
{% endhint %}

Jobs that sit in a category take their icon from that category, not from `civ`.

### Categories

```lua
Config.Categories = {
    enabled = true,
    categories = {
        state = {
            icon = 'shield-halved',
            jobs = { 'police', 'ambulance' },
        },
        crime = {
            icon = 'masks-theater',
            jobs = { 'ballas', 'vagos' },
        },
    },
}
```

A category groups ESX jobs under a key you choose (`state` and `crime` above). Each category has its own Font Awesome `icon` and a list of ESX `jobs`. Add as many categories as you like, and put as many jobs in each as you need.

| Field        | Description                                                                  |
| ------------ | ---------------------------------------------------------------------------- |
| `enabled`    | Master switch. `false` turns the whole system off, the icons and the exports |
| `categories` | Table of category keys, each with an `icon` and a `jobs` list                |
| `icon`       | Font Awesome icon for that category's job rows                               |
| `jobs`       | ESX job names that belong to the category                                    |

#### Rules

* A job can be in **one** category only. If a job appears in two categories the server prints a warning on start and keeps the first one.
* `civ` is reserved. It is the fallback for every job that is in no category, so you cannot use it as a category key.
* Jobs that are in no category are treated as `civ` and use the `civ` icon.

#### Category labels

The category key is what the menu tooltip and the exports report. To show a nicer label in the menu, add a `ui_class_<key>` entry to your locale files. The resource ships `ui_class_civ`, `ui_class_state` and `ui_class_crime` in English and German. For your own categories add the matching key, for example:

```lua
['ui_class_medical'] = 'Medical',
```

If there is no locale entry for a key, the key itself is shown.

### Turning it off

Set `Config.Categories.enabled = false` to disable categories. The rows then all use the `civ` icon, the class tooltip is gone, and the `HasJobClass` and `GetJobClass` exports return `false` and `civ`. See Exports for those.
