> 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-4/additional-informations.md).

# Additional Informations

### Localization (Adding New Languages) <a href="#user-content--localization-adding-new-languages" id="user-content--localization-adding-new-languages"></a>

The MDT supports multiple languages. Follow these steps to add a new one (e.g., Dutch `nl`).

1. **Create the File:**
   * Navigate to `config/translations/`.
   * Copy `en.lua` and paste it as `nl.lua`.
   * Open `nl.lua` and translate the content. **Important:** Change the language code at the top:

     ```
     luaTRANSLATIONS['nl-NL'] = { -- Change code here    code = "nl-NL",    -- ... translations}
     ```
2. **Register in Manifest:**
   * Open `fxmanifest.lua`.
   * Add your new file to `shared_scripts`:

     ```
     luashared_scripts {    -- ... others    'config/translations/nl.lua', -- Add this line    'config/config.lua',}
     ```
   * Add it to `escrow_ignore` (to ensure it loads for you):

     ```
     luaescrow_ignore {    -- ... others    'config/translations/nl.lua', -- Add this line}
     ```
3. **Update Config:**
   * Open `config/config.lua`.
   * Set `Config.Locale = "nl-NL"`.
   * (Optional) Add it to the login screen format options in `Config.NUI` if you want players to select it manually.

***

### UI & Branding Customization <a href="#user-content--ui--branding-customization" id="user-content--ui--branding-customization"></a>

Most branding can be done without editing the HTML/CSS directly.

#### Changing Logotypes and Colors <a href="#user-content-changing-logotypes-and-colors" id="user-content-changing-logotypes-and-colors"></a>

* **Primary Color:** In `config.lua`, find `Config.Basics.primaryColor`. This accepts a HSL value (e.g., `"233 99% 59%"`).
* **Images:** You can change the sidebar icons and rank icons in `config.lua` by providing direct URLs (Discord webhooks or Imgur links recommended).
* **Bodycam:** The bodycam logo and overlay text are fully editable in `Config.NUI.bodyCam`.

#### Advanced UI Edits <a href="#user-content-advanced-ui-edits" id="user-content-advanced-ui-edits"></a>

The UI is built with React and bundled. You cannot directly edit `.jsx` files without the source code. However, you can:

* **Replace Static Assets:** If you need to replace specific bundled images, check `web/dist/assets/`. *Note: Most images should be changed via Config URLs instead.*

***

### Advanced Script Configuration <a href="#user-content--advanced-script-configuration" id="user-content--advanced-script-configuration"></a>

#### Customizing Animations & Props <a href="#user-content-customizing-animations--props" id="user-content-customizing-animations--props"></a>

If you have a custom tablet prop or animation dictionary you prefer:

1. Open `client/main.lua` (Note: This file is open source in some versions, but core logic might be locked. If accessible:).
2. Look for `CLIENT.tabletModel`, `CLIENT.tabletDict`, and `CLIENT.tabletAnim`.
3. Change these values to your preferred animation.
   * *Warning:* Converting this to a different item (e.g., clipboard) may require adjusting the `AttachEntityToEntity` bone index and offsets in `attachObject()` function.

#### Death Logic <a href="#user-content-death-logic" id="user-content-death-logic"></a>

By default, the MDT closes when a player dies.

* **File:** `config/client/death.lua`
* **Customization:** You can remove the `CLIENT.CloseMDT()` call if you want the MDT to remain open (e.g., for EMS to see details), or add extra logic to check for specific injury states.

***

### Database & Manual Fixes <a href="#user-content-database-manual-fixes" id="user-content-database-manual-fixes"></a>

The script uses `oxmysql`. Key tables include:

* `qf_mdt_police_officers`: Stores police specific data (hours, badge, active duty status).
  * *Issue:* Player cannot go on duty?
  * *Fix:* Check if they exist in this table. If `fireJob` config is used, ensure they haven't been "fired" in the database (removed row).
* `qf_mdt_police_warrants`: Active warrants.
* `qf_mdt_police_audit_logs`: All history.

**Tip:** If you wipe your server database (users/players), **you must also wipe** `qf_mdt_police_officers` to prevent "ghost" officers appearing in lists who no longer exist in the main users table.

***

### FAQ & Troubleshooting <a href="#user-content--faq--troubleshooting" id="user-content--faq--troubleshooting"></a>

#### Q: The MDT won't open when I press the key. <a href="#user-content-q-the-mdt-wont-open-when-i-press-the-key" id="user-content-q-the-mdt-wont-open-when-i-press-the-key"></a>

**A:**

1. Check `config.lua`: Is your job named `'police'`? If you use `'lspd'`, change `Config.Jobs = {['lspd'] = true}`.
2. Check `config/client/editable.lua`: The `CanOpenMDT` function might have custom restrictions (e.g., must be in vehicle).
3. Check Server Console: Are there any SQL errors during startup?

#### Q: Images in the Gallery/Mugshots are broken. <a href="#user-content-q-images-in-the-gallerymugshots-are-broken" id="user-content-q-images-in-the-gallerymugshots-are-broken"></a>

**A:**&#x20;

* This is usually a Discord/imgur hotlinking issue.
* Ensure the URL is a distinct image link (ends in .png/.jpg).
* If using Discord, their links now expire. We recommend using a dedicated image host or a self-hosted proxy if you store many images.

#### Q: How do I add a new vehicle class color for dispatch? <a href="#user-content-q-how-do-i-add-a-new-vehicle-class-color-for-dispatch" id="user-content-q-how-do-i-add-a-new-vehicle-class-color-for-dispatch"></a>

**A:** In `config.lua` -> `Config.Dispatch.Colors`. You can add new mappings based on the vehicle class ID (GTA V assumes class 0-21).

```lua
['22'] = 'Bright Pink' -- Example for a custom class
```

#### Q: "You are not a police officer" error, but I have the job. <a href="#user-content-q-you-are-not-a-police-officer-error-but-i-have-the-job" id="user-content-q-you-are-not-a-police-officer-error-but-i-have-the-job"></a>

**A:** Ensure `Config.Grades` matches your `esx_addonaccount` or `qb-core` shared configuration **exactly**. If your database grade is `4` but config only goes to `3`, the script may fail to validate the officer.


---

# 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 dynamically by asking a question.

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

```
GET https://wiki.qfdevelopers.com/scripts/editor-4/additional-informations.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.
