Config File

The script is fully configurable, allowing complete customization of its behavior and features. Below is a list of configuration files included in the resource.

-- ──────────────────────────────────────────────────────────────────────────────
-- Dependency Check Helper                                                     
-- (Information) β–Ί Returns the first matching started resource alias from provided table.
-- (Information) β–Ί Used by Fuel/Keys/TextUI/Inventory/Target detection above.
-- ──────────────────────────────────────────────────────────────────────────────
function scriptCheck(data)            -- Do not modify unless you know what you're doing.
    for k, v in pairs(data) do
        if GetResourceState(k):find('started') ~= nil then
            return v
        end
    end
    return false
end

-- ──────────────────────────────────────────────────────────────────────────────
--  OTHERPLANET / OP Ambulance MDT / Main CONFIGURATION
-- ──────────────────────────────────────────────────────────────────────────────
--  This configuration file controls all customizable behaviour of OP Ambulance MDT
--  Always make a backup before editing.
--  Wrong edits can break the resource.
-- ──────────────────────────────────────────────────────────────────────────────

Config = {}

-- ──────────────────────────────────────────────────────────────────────────────
-- Locale & Debug                                                             
-- (Information) β–Ί Locale controls which language file from locales/* will be used.
-- (Information) β–Ί Debug enables extra logging to help with issue tracking.
-- ──────────────────────────────────────────────────────────────────────────────

Config.Locale = "en"                  -- Supported: EN, DE, EL, SK, SV
Config.Debug  = false                 -- true = verbose debug output in console.

-- ──────────────────────────────────────────────────────────────────────────────
-- Currency Formatting                                                         
-- (Information) β–Ί Visual formatting of money values in the UI (JS Intl.NumberFormat).
-- (Information) β–Ί This does NOT change internal game currency logic, only display.
-- ──────────────────────────────────────────────────────────────────────────────

Config.CurrencySettings = {
    -- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
    currency = "USD",
    style = "currency",
    format = "en-US"
}

-- ──────────────────────────────────────────────────────────────────────────────
-- MISC CONFIGURATION                                                   
-- (Information) β–Ί Notifications and Target
-- ──────────────────────────────────────────────────────────────────────────────

local targets = { -- Target libraries detection
    ['ox_target'] = "ox-target",
    ['qb-target'] = "qb-target"
}

local notifyScripts = { -- Notify libraries detection
    ['op-hud'] = "op_hud",
    ['okokNotify'] = "okokNotify",
    ['vms_notify'] = "vms_notify",
    ['ox_lib'] = "ox_lib",
    ['brutal_notify'] = "brutal_notify",
}

Config.Target = scriptCheck(targets) or 'none' -- Supported: ox-target / qb-target / none
Config.Notify = scriptCheck(notifyScripts) or 'none'

-- ──────────────────────────────────────────────────────────────────────────────
-- Text UI Dependency Detection                                                
-- (Information) β–Ί Auto-detects supported 3D/2D Text UI libraries.
-- (Information) β–Ί If none is found, some prompts may fallback to default behaviour.
-- ──────────────────────────────────────────────────────────────────────────────
local textUIScripts = {              
    ['ox_lib']        = "ox_lib",
    ['jg-textui']     = "jg-textui",
    ['okokTextUI']    = "okokTextUI",
    ['brutal_textui'] = "brutal_textui",
    ['0r-textui']     = "0r-textui",
}
Config.TextUI = scriptCheck(textUIScripts) or 'none' 

-- ──────────────────────────────────────────────────────────────────────────────
-- Banking SCRIPT Detection                                           
-- (Information) β–Ί Auto-detects supported banking scripts
-- (Information) β–Ί If none is found, some prompts may fallback to default behaviour.
-- ──────────────────────────────────────────────────────────────────────────────

local bankingScripts = {              
    ['esx_addonaccount'] = "esx_addonaccount",
    ['qb-banking']       = "qb-banking",
    ['fd_banking']       = "fd_banking",
    ['okokBanking']      = "okokBanking",
    ['Renewed-Banking']  = "Renewed-Banking",
    ['tgg-banking']      = "tgg-banking"
}
Config.Banking = scriptCheck(bankingScripts) or 'none' 

-- ──────────────────────────────────────────────────────────────────────────────
-- Garage Script                                                               
-- (Information) β–Ί Manual selection of external garage script integration.
-- ──────────────────────────────────────────────────────────────────────────────

Config.GarageScript = "op-garages" -- op-garages / jg-advancedgarages 

-- ──────────────────────────────────────────────────────────────────────────────
-- Jobs Configuration                                                          
-- (Information) β–Ί Defines which jobs can access the MDT.
-- (Information) β–Ί Each job has its own separated tablet and data.
-- (Information) β–Ί This is NOT a multi-job tablet – each job must be defined separately.
-- (Information) β–Ί Key = job name | Value = job display label.
-- ──────────────────────────────────────────────────────────────────────────────
Config.Jobs = {
    ["ambulance"] = "Emergency Medical Services",
}

-- ──────────────────────────────────────────────────────────────────────────────
-- Commands Configuration                                                       
-- (Information) β–Ί Enables or disables available MDT-related commands.
-- (Information) β–Ί Commands are optional and can be fully disabled.
-- (Information) β–Ί Command names must be unique and not conflict with other scripts.
-- ──────────────────────────────────────────────────────────────────────────────
Config.Commands = {
    openMDT = {
        enable = true, 
        command = "ambulancemdt"
    },
    adjustdispatch = {
        enable = true, 
        command = "adjustdispatch"
    },
    toggleDispatch = {
        enable = true, 
        command = "toggledispatch"
    }
}

-- ──────────────────────────────────────────────────────────────────────────────
-- Vehicle Shop Configuration                                                   
-- (Information) β–Ί Defines vehicles available for purchase via MDT.
-- (Information) β–Ί Vehicles are assigned per job.
-- (Information) β–Ί Prices, resale value and preview images are configurable.
-- (Information) β–Ί Vehicle models must exist in the server files.
-- ──────────────────────────────────────────────────────────────────────────────
Config.VehicleShop = {
    ["ambulance"] = {
        {
            label = "Ambulance",
            model = "ambulance",
            price = 95000,
            image = "https://docs.fivem.net/vehicles/ambulance.webp",
            resellPrice = 8500,
        },
        {
            label = "Lifeguard",
            model = "lguard",
            price = 120000,
            image = "https://docs.fivem.net/vehicles/lguard.webp",
            resellPrice = 100000,
        },
    }
}

-- ──────────────────────────────────────────────────────────────────────────────
-- Insurance System Configuration                                               
-- (Information) β–Ί Controls the insurance system used by MDT.
-- (Information) β–Ί Players can extend insurance for a selected time period.
-- (Information) β–Ί Insurance time is stored in UTC ISO format.
-- ──────────────────────────────────────────────────────────────────────────────
Config.Insurance = {

    -- ──────────────────────────────────────────────────────────────────────────
    -- Insurance Extend Options                                                   
    -- (Information) β–Ί Available insurance extension plans.
    -- (Information) β–Ί Key does not matter, value.value defines duration.
    -- (Information) β–Ί Time value is defined in HOURS.
    -- (Information) β–Ί Price is charged from selected payment method.
    -- ──────────────────────────────────────────────────────────────────────────
    ExtendOptions = {
        [24] = {
            value = 24, -- Time in hours
            price = 5500
        },
        [72] = {
            value = 72, -- Time in hours
            price = 9500
        },
        [144] = {
            value = 144, -- Time in hours
            price = 14500
        },
    },

    -- ──────────────────────────────────────────────────────────────────────────
    -- Insurance Ped Configuration                                                
    -- (Information) β–Ί Defines NPC used to access insurance features.
    -- (Information) β–Ί NPC can be interacted with via target or marker.
    -- (Information) β–Ί Ped animation and prop are fully configurable.
    -- ──────────────────────────────────────────────────────────────────────────
    InsurancePed = {
        ped_coords = vec4(340.8385, -1398.8954, 31.5093, 71.7369),
        ped_model = "s_m_m_paramedic_01",
        ped_gender = "male",

        ped_animation = false,
        --ped_animation = {
        --    Dict = "missheistdockssetup1clipboard@base",
        --    Lib  = "base",
        --    Prop = {
        --        Prop = 'prop_notepad_01',
        --        PropBone = 18905,
        --        PropPlacement = {
        --            0.1,
        --            0.02,
        --            0.05,
        --            10.0,
        --            0.0,
        --            0.0
        --        }
        --    }
        --},

        enable = true,

        -- Marker settings (used only when target system is disabled)
        markerColor = {
            r = 219,
            g = 0,
            b = 0,
        },

        -- Map blip configuration
        ped_blip = {
            BlipScale = 0.8, 
            blipId = 51,
            blipColor = 7
        }
    },

    -- ──────────────────────────────────────────────────────────────────────────
    -- Insurance Command Configuration                                            
    -- (Information) β–Ί Optional command to open insurance menu.
    -- (Information) β–Ί Useful when NPC is disabled or for quick access.
    -- ──────────────────────────────────────────────────────────────────────────
    InsuranceCommand = {
        enable = false,
        command = "myinsurance"
    }
}

Config.TabletAnimation = {
    enable = true,
    dict = "amb@code_human_in_bus_passenger_idles@female@tablet@idle_a",
    name = "idle_a",
    prop = { -- Replace prop table with false (prop = false) if you want to disable it!
        Prop = "prop_cs_tablet",
        PropBone = 28422,
        PropPlacement = {
            -0.05,
            0.0,
            0.0,
            0.0,
            -90.0,
            0.0
        }
    }
}

Last updated