> For the complete documentation index, see [llms.txt](https://unknown-development.gitbook.io/unknown-development/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unknown-development.gitbook.io/unknown-development/scripts/unknown_hud/installation.md).

# Installation

**Installation difficulty**

**🟣🟣⚫⚫⚫** - easy

***

### 1. Download Resource

To begin, download your recently purchased resource from [our store](https://corem.tebex.io/)

To do this, log in to your [cfx portal](https://portal.cfx.re/) account and navigate to the '**Asset Grants**' section, where you will find your owned resources.

***

### 2. Dependencies

Before installing **HUD**, you must ensure the following dependencies are installed:

<details>

<summary><a href="https://github.com/esx-framework/esx_core/tree/main">es_extended</a> | <a href="https://github.com/qbcore-framework/qb-core/tree/main">qb-core</a> | <a href="https://github.com/Qbox-project/qbx_core">qbx_core</a></summary>

The script supports **ESX, QBCore, and Qbox**, providing a flexible and versatile solution for different server setups.

</details>

***

### 3. Install HUD

Add `unknown_hud` folder to your server `resources` folder and start them by adding the following to your `server.cfg`:\
`ensure unknown_hud`

{% hint style="warning" %}
Dependencies **must** be ensured before `unknown_hud`, otherwise the script may not function correctly.
{% endhint %}

***

### 4. <mark style="color:blue;">\[MODIFY]</mark> Replace ox\_lib notifications to unknown\_hud

To have HUD instead of ox\_lib notify, change the function `lib.notify(data)` in the `ox_lib/resource/interface/client/notify.lua` file:

```lua
function lib.notify(data)
    local notifyType = data.type or 'info'
    local title = data.title or ''

    if notifyType == 'error' and title == '' then
        title = 'Error'
    elseif notifyType == 'success' and title == '' then
        title = 'Success'
    elseif notifyType == 'info' and title == '' then
        title = 'Notification'
    elseif notifyType == 'inform' and title == '' then
        title = 'Notification'
    elseif notifyType == 'warning' and title == '' then
        title = 'Warning'
    end

    local description = data.description or ''
    local duration = data.duration or 5000

    exports['unknown_hud']:Notify(title, description, notifyType, duration)
end
```

***

### 5. <mark style="color:blue;">\[MODIFY]</mark> Replace QBCore notifications to unknown\_hud

To have HUD instead of QBCore notify, change the function `QBCore.Functions.Notify(text, texttype, length, icon)` in the `qb-core/client/functions.lua` file:

```lua
function QBCore.Functions.Notify(text, texttype, length, icon)
    local notifyType = texttype or 'info'
    local duration = length or 5000

    local title = ''
    local description = ''

    if type(text) == 'table' then
        title = text.caption or ''
        description = text.text or ''
    else
        description = text
    end

    if notifyType == 'error' and title == '' then
        title = 'Error'
    elseif notifyType == 'success' and title == '' then
        title = 'Success'
    elseif notifyType == 'info' and title == '' then
        title = 'Notification'
    elseif notifyType == 'inform' and title == '' then
        title = 'Notification'
    elseif notifyType == 'warning' and title == '' then
        title = 'Warning'
    end

    exports['unknown_hud']:Notify(title, description, notifyType, duration)
end
```

***

### 6. <mark style="color:blue;">\[MODIFY]</mark> Replace ESX notifications to unknown\_hud

To have HUD instead of ESX notify, change the function `Notify(notificatonType, length, message, title, position)` in the `esx_core/[core]/esx_notify/Notify.lua` file:

```lua
local function Notify(notificatonType, length, message, title, position)
    if Debug then
        print("1 ".. tostring(notificatonType))
        print("2 ".. tostring(length))
        print("3 ".. tostring(message))
        print("4 ".. tostring(title))
        print("5 ".. tostring(position))
    end

    if type(notificatonType) ~= "string" then
        notificatonType = "info"
    end

    if type(length) ~= "number" then
        length = 3000
    end


    if type(message) == "string" then
        message = message:gsub("~br~", "<br>")
    end

    if notificatonType == 'error' and (not title or title == '') then
        title = 'Error'
    elseif notificatonType == 'success' and (not title or title == '') then
        title = 'Success'
    elseif notificatonType == 'info' and (not title or title == '') then
        title = 'Notification'
    elseif notificatonType == 'inform' and (not title or title == '') then
        title = 'Notification'
    elseif notificatonType == 'warning' and (not title or title == '') then
        title = 'Warning'
    end

    if Debug then
        print("FINAL:")
        print("TYPE:", notificatonType)
        print("TITLE:", title)
        print("DESC:", message)
        print("DURATION:", length)
        print("POSITION:", position)
    end

    exports['unknown_hud']:Notify(title, message, notificatonType, length)
end
```

***

### 7. <mark style="color:blue;">\[MODIFY]</mark> Add Job Card dropdown when ox\_inventory is opened

To add this feature, adjust the functions `Utils.blurIn()` and `Utils.blurOut()` in the `ox_inventory/modules/utils/client.lua` file:

```lua
function Utils.blurIn()
    if IsScreenblurFadeRunning() then
        DisableScreenblurFade()
    end
    TriggerScreenblurFadeIn(100)
    
    exports['unknown_hud']:ToggleBlurCard(true)
end


function Utils.blurOut()
    if IsScreenblurFadeRunning() then
        DisableScreenblurFade()
    end
    TriggerScreenblurFadeOut(250)

    exports['unknown_hud']:ToggleBlurCard(false)
end
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://unknown-development.gitbook.io/unknown-development/scripts/unknown_hud/installation.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.
