> 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/features/commands-and-permissions.md).

# Commands and Permissions

`rcore_mdt` has a small set of commands for department members.

## ⌨️ Commands

| Command     | Who uses it        | Description                                                       |
| ----------- | ------------------ | ----------------------------------------------------------------- |
| `/mdt`      | Department members | Opens or closes the MDT. The name is set in `CONFIG.OpenCommand`. |
| `/openmdt`  | Department members | Opens the MDT.                                                    |
| `/closemdt` | Anyone             | Closes the MDT.                                                   |

Press `ESC` to close the MDT.

{% hint style="info" %}
There is no default key. Players can bind the command themselves from the F8 console, for example `bind keyboard F7 mdt`.
{% endhint %}

## 🔐 MDT Access

A player can open the MDT when:

* their job is a department in `CONFIG.JOBS`
* they are on duty, on QBCore and QBX
* they carry `CONFIG.RequiredItem`, if `CONFIG.RequireItem = true`

Players who lose access while the MDT is open, for example after being fired, have it closed automatically.

## 🛡️ Rank Permissions

Every department member can view the screens enabled for their department. Creating, editing, and deleting content needs a permission from the rank's `Perms` list.

{% tabs %}
{% tab title="Default police ranks" %}

| Rank         | Permissions                                                                       |
| ------------ | --------------------------------------------------------------------------------- |
| Captain      | All                                                                               |
| Lieutenant   | `incidents`, `profiles`, `bolos`, `case_files`, `bulletins`, `boards`, `vehicles` |
| Sergeant     | `incidents`, `profiles`, `bolos`, `case_files`, `vehicles`                        |
| Officer      | `incidents`, `profiles`, `bolos`, `vehicles`                                      |
| Recruit      | Read-only                                                                         |
| {% endtab %} |                                                                                   |

{% tab title="Default EMS ranks" %}

| Rank          | Permissions                                                   |
| ------------- | ------------------------------------------------------------- |
| Director      | All                                                           |
| Sr. Paramedic | `incidents`, `profiles`, `case_files`, `bulletins`, `medical` |
| Paramedic     | `incidents`, `profiles`, `case_files`, `medical`              |
| EMT           | `incidents`, `medical`                                        |
| Trainee       | Read-only                                                     |
| {% endtab %}  |                                                               |
| {% endtabs %} |                                                               |

See [Shared Config](https://documentation.rcore.cz/paid-resources/rcore_mdt/configuration/shared-config.md#permissions) for what each permission allows and [Add Jobs](https://documentation.rcore.cz/paid-resources/rcore_mdt/configuration/add-jobs.md#rank-permissions) to change them.

## ✏️ Change Commands

Edit `configs/cl_config.lua`:

```lua
CONFIG.OpenCommand = 'mdt'
```

Set it to `false` to remove the command and open the MDT only through the [Client API](https://documentation.rcore.cz/paid-resources/rcore_mdt/api/client.md).
