---
description: >-
  ESX / QB | Fully Customizable | 0.02ms (Best Optimize) | Full Responsive UI
  (4k Supported) | Car Nitro System | Notifications System | Safe Zone System |
  Car wipe System | Admin Announcement
---

# HUD V2



<details>

<summary>Notifications Implementation</summary>

Types: `error`, `success`, `info`, `server`, `carwipe`.

* Export: `exports["if-hudv2"]:SendNotification(message, type, duration)`
* Event: `TriggerEvent("if-hudv2:SendNotification", message, type, duration)`

```lua
exports["if-hudv2"]:SendNotification("Pay attention!", "info", 3000)
```

</details>

<details>

<summary>Progressbar Implementation</summary>

* Export: `exports["if-hudv2"]:ProgressStart(Message, Duration, Options)`

```lua
exports["if-hudv2"]:ProgressStart("Performing an action", 3000, {
    FreezePlayer = true, 
    footerMessage = "Searching a sandwich...",
    animation = {
        type = "anim",
        dict = "anim@mp_player_intmenu@key_fob@", 
        lib ="fob_click"
        -- or scenario:
        -- type = "scenario",
        -- Scenario = "PROP_HUMAN_BUM_BIN", 
    },
    onFinish = function()
        --Code here
    end, onCancel = function()
        --Code here
    end
})
```

</details>

<details>

<summary>Zones Notifications Implementation</summary>

Types: `green`, `red`, `warning`.

* Export: `exports["if-hudv2"]:SendZoneNotification(message, type)`, `exports["if-hudv2"]:HideZoneNotification()`
* Event: `TriggerEvent("if-hudv2:SendZoneNotification", message, type)`, `TriggerEvent("if-hudv2:HideZoneNotification")`

```lua
exports["if-hudv2"]:SendZoneNotification("Pay attention in this zone!", "warning")
exports["if-hudv2"]:HideZoneNotification()
```

</details>

<details>

<summary>Dialog Implementation</summary>

* Export: `exports["if-hudv2"]:showDialog(author, message, callback, yesBtnText, noBtnText)`&#x20;
* Event: `TriggerEvent("if-hudv2:showDialog", author, message, callback, yesBtn, noBtn)`

```lua
showDialog('HUD', 'Wanna see a happy face in F8?', function(cb)
    if (cb == 'yes') then
        print(':)')
    else
        print(':0 :|')
    end
end)
```

</details>

<details>

<summary>Draw Text Implementation</summary>

* Exports: `exports["if-hudv2"]:drawText(button, buttonAction, buttonMessage)`, `exports["if-hudv2"]:hideText()`, `exports["if-hudv2"]:changeText(button, buttonAction, buttonMessage)`
* Events: `TriggerEvent("if-hudv2:drawText", button, buttonAction, buttonMessage)`, `TriggerEvent("if-hudv2:changeText", button, buttonAction, buttonMessage)`, `TriggerEvent("if-hudv2:hideText")`

```lua
exports["if-hudv2"]:drawText('E', 'Close this', 'This is a message')
Wait(5000)
exports["if-hudv2"]:hideText()
```

</details>

