# Replace core notifications

## Replacing core notification with vms\_notify

{% tabs %}
{% tab title="ESX" %}

### Replace ESX Notifications

1. Open **@es\_extended/client/functions.lua**.
2. Search for `function ESX.ShowNotification`.
3. Replace the function with this one below.

```lua
function ESX.ShowNotification(message, type, length, custom_icon)
    local message = message
    local colors = type and type == "main" and "#19a3ff" or type == "success" and "#2bff72" or type == "error" and "#ff2b2b" or "#YOUR_DEFAULT_COLOR"
    local icon = custom_icon or "YOUR_DEFAULT_FONT_AWESOME"
    exports['vms_notify']:Notification("YOUR_DEFAULT_TITLE", message, length or 4500, colors, icon)
end
```

{% endtab %}

{% tab title="QB-CORE" %}

### Replace QB-Core Notifications

1. Open **@qb-core/client/functions.lua**.
2. Search for `function QBCore.Functions.Notify`.
3. Replace the function with this one below

```lua
function QBCore.Functions.Notify(text, textype, length, custom_icon)
    if type(text) == "table" then
        local message = text.text
        local length = length or 5000
        local color = texttype == 'primary' and '#1c75d2' or texttype == 'success' and '#20bb44' or texttype == 'error' and '#c10114' or '#YOUR_DEFAULT_COLOR'
        local icon = custom_icon or 'YOUR_DEFAULT_FONT_AWESOME'
        exports["vms_notify"]:Notification('YOUR_DEFAULT_TITLE', message, length, color, icon)
    else
        local color = texttype == 'primary' and '#1c75d2' or texttype == 'success' and '#20bb44' or texttype == 'error' and '#c10114' or '#YOUR_DEFAULT_COLOR'
        local icon = custom_icon or 'YOUR_DEFAULT_FONT_AWESOME'
        local length = length or 5000
        exports["vms_notify"]:Notification('YOUR_DEFAULT_TITLE', text, length, color, icon)
    end
end 
```

{% endtab %}
{% endtabs %}


---

# 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.vames-store.com/outdated/vms_notify/guides/replace-core-notifications.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.
