Additional Informations

Page dedicated to Additional Informations about our Ambulance MDT [V2]

Installation Guide

1. Requirements

Ensure you have the following dependencies installed and started before the MDT:

  • ox_lib (Latest version)

  • oxmysql

  • es_extended OR qb-core OR qbx_core

  • ox_target OR qb-target (if you want target interactions)

2. Database Setup

  1. Locate the .sql file provided with your download.

  2. Import it into your server's database (e.g., using HeidiSQL or phpMyAdmin).

    • Note: This script requires specific tables such as qf_mdt_ambulance_radio_codes to function.

3. Inventory Setup (Ox Inventory)

If you are using ox_inventory, add the following items to your data/items.lua (or ox_inventory/data/items.lua):

Ensure you also copy the images to the inventory's web/images/ directory.


Advanced Configuration

Adding a New Drug

To add a new medication, you must update two sections in

config/config.lua:

Step 1: Define the Item and Effect In Config.PrescriptionSettings.medications:

Step 2: Define Dosage Rules In Config.NUI.medications:

Step 3: Define Medical Protocols In Config.NUI.medProtocols:

Adding a New Hospital

To add a new hospital location to the map, add an entry to Config.Map.Hospitals:

Customizing Colors

You can change the primary theme color in Config.NUI.primaryColor. Use an RGB table format:

Note: Some parts of the UI (specifically HSL values in audit logs) might need separate manual adjustments if you drastically change the theme.


Localization (Adding Languages)

  1. Navigate to config/translations/.

  2. Duplicate en.lua and rename it (e.g., es.lua for Spanish).

  3. Open the file and change the code at the top:

  4. Open config/config.lua and update Config.NUI.langs to include your new language:

  5. Set Config.Locale = "es-ES" to make it default.


Troubleshooting (FAQ)

1. "The MDT won't open!"

  • Check Job: Ensure your player has the ambulance job (or whatever is configured in Config.Jobs).

  • Check Keybind: Press DELETE (default). Check F8 console for errors.

  • Check Resource State: Ensure the resource is strictly named qf_mdt_ambulance_v2 if the code references it by name.

2. "I can't see any items in the Pharmacy/Prescriptions."

  • Check Inventory: Ensure ox_inventory is started and the items are added to data/items.lua.

  • Check Console: Note any errors related to "Item not found".

3. "Database errors in console."

  • Import SQL: Confirm you imported the provided .sql file.

  • MySQL Connection: Ensure oxmysql is connected and working for other resources.

4. "Images are broken."

  • Mugshots: Mugshots require a valid heavy-duty hosting or accurate Discord webhook if modified.

  • Inventory Images: Move the images from the script's img folder (if provided) to your inventory's image directory.

5. "I can't fire/hire medics."

  • Permissions: Ensure your character has a high enough grade in the database.

  • Config Check: Check Config.NUI.requiredGrades to see what grade level is required for those actions.

Last updated