> For the complete documentation index, see [llms.txt](https://wiki.qfdevelopers.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.qfdevelopers.com/scripts/editor-22-1/installation.md).

# Installation

Page dedicated to how to install our DOJ MDT \[V2]

## Step #1 - Drag & Drop

Just Drag & Drop the `qf_mdt_doj_v2` folder into your `resources` folder.

{% hint style="warning" %}
Keep the folder name **`qf_mdt_doj_v2`**. It is used for events, NUI paths and table names, so renaming the folder breaks the resource.
{% endhint %}

## Step #2 - SQL Installation

{% hint style="info" %}
There’s no need to manually insert any SQL file into your database. Our script creates every table on first launch, and updates only ever add what is missing, so restarting or updating the resource never drops your data.
{% endhint %}

## Step #3 - Job

By default the tablet opens for the job named `doj`. If your court uses another job name, change it in `Config.Jobs` and `Config.Society` (see [Configuration](https://wiki.qfdevelopers.com/scripts/editor-22-1/configuration.md)).

## Step #4 - Items (optional)

The tablet, court IDs, court papers and identity cards can be inventory items. Item definitions for ox\_inventory are in `ox_inventory_items.md` inside the resource. On qb-inventory, ps-inventory, codem-inventory, tgiann-inventory and qs-inventory use that inventory's own item format with the same names and `unique = true`, `useable = true`, `shouldClose = true`.

{% hint style="info" %}
Court IDs are cards with an owner by default (`Config.Badge.item.mode = "owner"`), so the item `qf_mdt_doj_v2_badge` has to exist in your inventory. Without it the card works the simple way: the item and the key show the card of whoever uses them.
{% endhint %}

## Step #5 - Script start

Make sure `oxmysql` and your framework start before the MDT:

```
ensure oxmysql
ensure es_extended        # or qb-core / qbx_core
ensure qf_mdt_doj_v2
```

If you also run our [Police MDT \[V2\]](https://wiki.qfdevelopers.com/scripts/editor-4.md), start it before the DOJ MDT so the bridge finds its tables on the first check:

```
ensure qf_mdt_police_v2
ensure qf_mdt_doj_v2
```

The order is a convenience, not a requirement: the bridge checks again on every poll.

## Step #6 - Admin permissions

Two admin commands are protected by aces. Add them to your `server.cfg`:

```
add_ace group.admin qf_mdt_doj_v2.doctor allow
add_ace group.admin qf_mdt_doj_v2.identity allow
```

After the first start run `/mdt doctor`. It checks your configuration and tells you which option to fix, for example a picture missing from `artwork/` or an option that no longer exists.

## Requirements

* ESX, QBCore or QBox (detected automatically)
* `oxmysql`
* FiveM server build **4752** or newer
* `screenshot-basic` for the identity photo booth and gallery photos. Without it cards use the stored mugshot instead.

Optional:

* ox\_inventory, qs-inventory, tgiann-inventory, codem-inventory, ps-inventory or qb-inventory for papers and cards as items
* `ox_target` or `qb-target` for the e-office clerk and the photographer. Without them a key prompt on E is used.
* `qf_mdt_police_v2` for the bridge that turns police charges into DOJ cases

{% hint style="info" %}
The DOJ MDT streams no assets of its own. It uses the base game tablet prop, which you can change in `Config.Tablet`.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://wiki.qfdevelopers.com/scripts/editor-22-1/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
