# Config

```lua
Config = {}

Config.SpeedType = "KMH" -- KMH or MPH
Config.NitroKey = "X"
Config.SeatBeltKey = "B"
Config.MinimapJustInVehicle = false -- If you want to show minimap only when player is in vehicle, set this to true
Config.HudCommand = "hud"
Config.FixedSizeNuiWarning = true

Config.SpeedMultiplier = Config.SpeedType == "KMH" and 3.6 or 2.236936
Config.NitroItem = "nitrous"
Config.RemoveNitroOnMilliseconds = 1


Config.UseCustomFuel = false -- If you want to use custom fuel script, set this to true and set the export name below
Config.CustomFuel = function(vehicle)
    return exports['LegacyFuel']:GetFuel(vehicle)
end


Config.ServerLogo = 'https://files.catbox.moe/406f5v.png'
Config.Inventory = "esx" -- esx, qb, ox is available.
Config.InventoryImagePath = function()
    if (Config.Inventory == "qb") then
        return 'nui://qb-inventory/html/images/'
    elseif (Config.Inventory == "esx") then
        return 'nui://esx_inventoryhud/html/img/items'
    elseif (Config.Inventory == "ox") then
        return 'nui://ox_inventory/web/images/'
    else
        return '' -- You can fill this with your inventoryhud image path.
    end
end
Config.NotifyEvent = "esx" -- esx, qb, ox is available if you using different script for notify, you can leave it blank. (dont forget add the export of notify below.)


---@class NotifyType: string | "info" | "success" | "error" | "warning"
Config.Notify = function(title, message, type_, length, icon)
    if Config.NotifyEvent == 'esx' then
        TriggerEvent('esx:showNotification', message)
    elseif Config.NotifyEvent == 'qb' then
        
        TriggerEvent('QBCore:Notify', message, type_, length)
    elseif Config.NotifyEvent == 'ox' then
        TriggerEvent("ox_lib:notify", {
            title = title,
            description = message,
            type = type_,
            duration = length,
            icon = icon 
        })
    else
        -- You can paste your notification export or something.
        print(('Notification: [%s] %s'):format(title, message))
    end
end

Config.StressNotify = true
Config.MinStressToBlur = 50
Config.WhitelistedWeaponStress = { -- Weapons that won't stress
    `weapon_petrolcan`,
    `weapon_hazardcan`,
    `weapon_fireextinguisher`,
    `weapon_candycane`,
    `weapon_flashlight`,
    `weapon_ball`,
    `weapon_acidpackage`,
    `weapon_snowball`,
    `weapon_fertilizercan`,
    `gadget_parachute`,
    `weapon_flare`,
}

Config.AddStress = {
    ["on_shoot"] = {
        min = 1,
        max = 2,
        enable = true,
        chance = 20, -- Change to get stressed
    },
    ["on_fastdrive"] = {
        min = 1,
        max = 3,
        enable = true,
        minSpeed = 110, -- Minimum speed to get stressed
        chance = 50, -- Change to get stressed
    },
}

Config.RemoveStress = {
    ["on_eat"] = {
        min = 5,
        max = 10,
        enable = true,
    },
    ["on_drink"] = {
        min = 5,
        max = 10,
        enable = true,

    },
    ["on_swim"] = {
        min = 5,
        max = 10,
        enable = true,

    },
    ["on_run"] = {
        min = 5,
        max = 10,
        enable = true,
    }
}

Config.Locale = "en"
Translations = {
  ["en"] = {
      ["NITRO"] = "Nitro",
      ["RUN_OUT_OF_NITRO"] = "Your nitro has run out!",
      ["NO_NITRO"] = "You don't have any nitro!",
      ["CANT_INSTALL_IN_CAR"] = "You can't install nitro while sitting in a car",
      ["FILLED_UP_NITRO"] = "You have filled up your nitro!",
      ["NO_CAR"] = "You are not near a vehicle!",
      ["STRESS"] = "Stress",
      ["YOUR_STRESS"] = "Your stress is %s",
  },
  ["de"] = {
      ["NITRO"] = "Nitro",
      ["RUN_OUT_OF_NITRO"] = "Dein Nitro ist aufgebraucht!",
      ["NO_NITRO"] = "Du hast kein Nitro!",
      ["CANT_INSTALL_IN_CAR"] = "Du kannst Nitro nicht installieren, während du im Auto sitzt",
      ["FILLED_UP_NITRO"] = "Du hast dein Nitro aufgefüllt!",
      ["NO_CAR"] = "Du bist nicht in der Nähe eines Fahrzeugs!",
      ["STRESS"] = "Stress",
      ["YOUR_STRESS"] = "Dein Stress beträgt %s",
  },
  ["fr"] = {
      ["NITRO"] = "Nitro",
      ["RUN_OUT_OF_NITRO"] = "Votre nitro est épuisé!",
      ["NO_NITRO"] = "Vous n'avez pas de nitro!",
      ["CANT_INSTALL_IN_CAR"] = "Vous ne pouvez pas installer du nitro en étant assis dans une voiture",
      ["FILLED_UP_NITRO"] = "Vous avez rempli votre nitro!",
      ["NO_CAR"] = "Vous n'êtes pas près d'un véhicule!",
      ["STRESS"] = "Stress",
      ["YOUR_STRESS"] = "Votre stress est de %s",
  },
  ["es"] = {
      ["NITRO"] = "Nitro",
      ["RUN_OUT_OF_NITRO"] = "¡Tu nitro se ha agotado!",
      ["NO_NITRO"] = "¡No tienes nitro!",
      ["CANT_INSTALL_IN_CAR"] = "No puedes instalar nitro mientras estás sentado en un coche",
      ["FILLED_UP_NITRO"] = "¡Has llenado tu nitro!",
      ["NO_CAR"] = "¡No estás cerca de un vehículo!",
      ["STRESS"] = "Estrés",
      ["YOUR_STRESS"] = "Tu nivel de estrés es %s",
  },
  ["pt"] = {
      ["NITRO"] = "Nitro",
      ["RUN_OUT_OF_NITRO"] = "Seu nitro acabou!",
      ["NO_NITRO"] = "Você não tem nitro!",
      ["CANT_INSTALL_IN_CAR"] = "Você não pode instalar nitro sentado em um carro",
      ["FILLED_UP_NITRO"] = "Você encheu seu nitro!",
      ["NO_CAR"] = "Você não está perto de um veículo!",
      ["STRESS"] = "Estresse",
      ["YOUR_STRESS"] = "Seu nível de estresse é %s",
  }
}

```


---

# Agent Instructions: 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://docs.ak4y.com/scripts/ak4y-hudv1/config.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.
