Configuration

Page dedicated to how to configure our Ambulance MDT [V2]

Languages

You can set the language of the script in the configuration file.

  • en-US: English

  • fr-FR: French

  • pl-PL: Polish

  • de-DE: German

  • es-ES: Spanish

  • pt-PT: Portugese

  • ja-JP: Japanese

  • es-IT: Italian

  • ko-KR: Korean

Config.Locale = "en-US"

Commands & Keybinds

General

  • /mdtambulance (DELETE): Toggle the MDT Dashboard.

  • /qfmdtambulancebadge (B): Show/Hide Medic Badge.

  • /bodycam: Toggle Bodycam Overlay.

Camera Mode

  • /qfmdtambulancestartcapturephoto (ENTER / SPACE): Take a photo.

  • /qfmdtambulanceblocknuifocus (L-ALT / RMB): Toggle mouse focus.

  • /qfmdtambulancecameratoggleflashlight (F): Toggle camera flashlight.

  • /qfmdtambulancecameratoggleside (R): Switch between Front/Back camera.

circle-info

Note: All keys are fully configurable in config.lua.

Configuration

The config/config.lua file contains the core settings for the resource. Below is a breakdown of the key sections:

Main Settings

Option
Description
Example

Config.Frameworks

Enable or disable support for specific frameworks.

{ ESX = { enabled = true }, ... }

Config.Debug

Enables debug prints in the server console.

true / false

Features

Option
Description

Config.ToggleMDT

Controls the keybind and command to open the MDT.

Config.Camera

Settings for the integrated camera system (blocking NUI focus, capture key).

Config.Badge

Settings for the medic badge display (keybind, command).

Config.Basics

Visual customization, primarily the primary color using HSL format.

NUI Settings (Config.NUI)

This section controls the visual aspect and functionality of the UI:

  • fractionName: The short name displayed for the department (e.g., "EMS").

  • primaryColor: The implementation of the primary color in RGB format for the UI.

  • sidebarPages: Toggle visibility of specific sidebar pages (e.g., set home = { show = false } to hide the home page).

  • medications: Define available medications, their dosage rates, and units.

  • medProtocols: Define medical protocols, side effects, and contraindications for each medication.

Gameplay Systems

  • Config.Pharmacy: Configures the pharmacy NPC, location, and blip. Supported targetSystem options include ox_target, qb-target, qtarget, or auto.

  • Config.PrescriptionSettings: logical settings for prescriptions, including the item name and effects of specific drugs (speed, armor, health regeneration).

  • Config.Map: Configuration for the live map, including hospital locations and vehicle types to track.

  • Config.Dispatch: Settings for the dispatch system, including ignored jobs and alert history duration.


Exports (Server-side)

AddLog

Adds a new entry to the audit log system. This is useful for logging actions from other scripts into the MDT.

Parameters:

  • source (number|nil): The player source ID. If nil, it is logged as "System".

  • tag (string): The category tag for the log (e.g., "Admission", "Prescription", "Hospital").

  • text (string): The main content of the log message.

  • color (string): The color tag for the entry. Supported: "blue", "red", "green", "orange", "black".

  • fields (table|nil): Key-value pairs of additional data to store (e.g., { patient = "Name", amount = 500 }).

  • args (table|nil): Arguments for translation placeholders if text is a translation key.

Return: void

Example:


Exports (Client-side)

CreateDispatchAlert

Creates a dispatch alert that appears on the MDT map and list for on-duty medics.

Parameters:

  • coords (vector3): The world coordinates of the alert.

  • title (string): The title of the alert (e.g., "Cardiac Arrest", "Injured Person").

  • description (string): A detailed description of the incident.

  • code (string): The dispatch code (e.g., "10-13", "10-99").

  • colorRGB (table): A table {r, g, b} representing the alert color.

  • maxMedics (number): The maximum number of units that can attach to this alert.

  • duration (number): How long (in ms) the alert stays active.

Return: void

Example:

showBodycam

Forces the Bodycam UI to become visible.

Example:

hideBodycam

Forces the Bodycam UI to hide.

Example:

toggleBodycam

Toggles the current state of the Bodycam UI.

Example:

showMedicBadge

Displays the medic badge card on the screen.

Parameters:

  • data (table): A table containing the badge details.

    • name (string): The name displayed on the badge.

    • gradeLabel (string): The rank or title.

    • badge (string): The badge number.

    • mugshot (string): URL to the image or base64 string.

    • duration (number): Time in ms to display the badge.

    • licenses (table): List of licenses { {label="Driver", active=true}, ... }.

Example:

GetMugShotBase64

Captures a mugshot of the specified ped and returns it as a Base64 string.

Parameters:

  • Ped (entity): The ped handle to capture.

  • Transparent (boolean): If true, attempts to remove the background (requires game support).

Return:

  • string: The Base64 encoded image.

Example:


Events

Client Events

qf_mdt_ambulance_v2:client:openPharmacy

Opens the pharmacy prescription redemption menu. This can be used by third-party target systems or interaction scripts.

Usage:

Dispatch Integrations & Custom Alerts

Compatibility

Enable 3rd party script compatibility by editing config/config.lua.

Custom Alerts

Control and send dispatch alerts to the MDT programmatically.

Last updated