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

# Installation & Configuration

***

### **Server cfg**

```shellscript
# iZaap Scripts - Notify
ensure izaap_notify
```

***

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

## Installation for QBCore

### Step 1

Put the **iz-notify** resource inside your `resources` folder.

### Step 2&#x20;

Go to your `server.cfg` and add:&#x20;

```shellscript
ensure iz-notify
```

> If your resource folder has another name, make sure to use the same name in `ensure`.

***

### Step 3 - Replace QBCore Client Notifications

Go to:

```lua
qb-core/client/functions.lua
```

Search for the existing notify function:

```lua
QBCore.Functions.Notify
```

Replace it with this:

```lua
function QBCore.Functions.Notify(text, texttype, length)
    TriggerEvent('izaap_notify:client:notify', text, texttype or 'info', length or 5000)
end
```

This will redirect all client-side QBCore notifications to **iZaap Notify**.

***

### Step 4 - Replace QBCore Server Notifications

Go to:

```lua
qb-core/server/functions.lua
```

Search for the existing notify function:

```lua
QBCore.Functions.Notify
```

Replace it with this:

```lua
function QBCore.Functions.Notify(source, text, texttype, length)
    TriggerClientEvent('izaap_notify:client:notify', source, text, texttype or 'info', length or 5000)
end
```

This will redirect all server-side QBCore notifications to **iZaap Notify**.

***

### Step 5 - Usage Examples

#### Client Side

```lua
TriggerEvent('izaap_notify:client:notify', 'This is an info notification.', 'info', 5000)
TriggerEvent('izaap_notify:client:notify', 'Action completed successfully.', 'success', 5000)
TriggerEvent('izaap_notify:client:notify', 'Be careful, something is wrong.', 'warning', 5000)
TriggerEvent('izaap_notify:client:notify', 'Something failed.', 'error', 5000)
```

You can also use the export:

```lua
exports['izaap_notify']:Notify('This is a notification.', 'info', 5000)
exports['izaap_notify']:ShowNotification('This is a notification.', 'success', 5000)
```

***

#### Server Side

```lua
TriggerClientEvent('izaap_notify:client:notify', source, 'This is a server notification.', 'info', 5000)
```

Or using the server event from your script:

```lua
TriggerEvent('izaap_notify:server:notify', 'This is a server notification.', 'success', 5000)
```

You can also use the export:

```lua
exports['izaap_notify']:Notify(source, 'This is a notification.', 'info', 5000)
exports['izaap_notify']:ShowNotification(source, 'This is a notification.', 'success', 5000)
```

***

### Step 6 - Notification Types

Available default types:

```lua
success
info
warning
error
```

Examples:

```lua
QBCore.Functions.Notify('You received money.', 'success', 5000)
QBCore.Functions.Notify('You do not have permission.', 'error', 5000)
QBCore.Functions.Notify('This action may be dangerous.', 'warning', 5000)
QBCore.Functions.Notify('New information available.', 'info', 5000)
```

***

### Step 7

Restart your server and enjoy **iZaap Notify**.
{% endtab %}

{% tab title="ESX" %}

## Installation for ESX

### &#x20;Step 1&#x20;

Put the **iz-notify** resource inside your `resources` folder.&#x20;

### Step 2&#x20;

Go to your `server.cfg` and add:

```shellscript
ensure iz-notify
```

> If your resource folder has another name, make sure to use the same name in `ensure` and exports.

***

### Step 3 - Replace ESX Client Notifications

Go to:

```lua
es_extended/client/functions.lua
```

Search for these functions:

```lua
ESX.ShowNotification
ESX.ShowHelpNotification
```

Replace them with this code:

```lua
function ESX.ShowNotification(message, notifyType, length, title)
    TriggerEvent(
        'izaap_notify:client:notify',
        message,
        notifyType or 'info',
        length or 5000,
        title
    )
end

function ESX.ShowHelpNotification(message, notifyType, length, title)
    TriggerEvent(
        'izaap_notify:client:notify',
        message,
        notifyType or 'info',
        length or 5000,
        title or 'Information'
    )
end
```

This will redirect the default ESX notifications to **iZaap Notify**.

***

### Step 4 - Optional Export Usage

You can also use the export directly in any client-side script:

```lua
exports['izaap_notify']:Notify('This is a notification.', 'info', 5000)
exports['izaap_notify']:ShowNotification('Action completed successfully.', 'success', 5000)
```

Examples:

```lua
exports['izaap_notify']:Notify('You received money.', 'success', 5000)
exports['izaap_notify']:Notify('You do not have permission.', 'error', 5000)
exports['izaap_notify']:Notify('Be careful, something is wrong.', 'warning', 5000)
exports['izaap_notify']:Notify('New information available.', 'info', 5000)
```

***

### Step 5 - Server Side Usage

From server-side scripts, use:

```lua
TriggerClientEvent('izaap_notify:client:notify', source, 'This is a server notification.', 'info', 5000)
```

Or use the server event:

```lua
TriggerEvent('izaap_notify:server:notify', 'This is a server notification.', 'success', 5000)
```

You can also use the server export:

```lua
exports['izaap_notify']:Notify(source, 'This is a notification.', 'info', 5000)
exports['izaap_notify']:ShowNotification(source, 'This is a notification.', 'success', 5000)
```

***

### Step 6 - Notification Types

Available default types:

```lua
success
info
warning
error
```

Examples:

```lua
ESX.ShowNotification('You received money.', 'success', 5000)
ESX.ShowNotification('You do not have permission.', 'error', 5000)
ESX.ShowNotification('This action may be dangerous.', 'warning', 5000)
ESX.ShowNotification('New information available.', 'info', 5000)
```

***

### Step 7

Restart your server and enjoy **iZaap Notify**.
{% endtab %}
{% endtabs %}

## Position Editor <a href="#position-editor" id="position-editor"></a>

iZaap Notify includes a built-in client editor for notification placement.

#### <mark style="color:$primary;">/notify</mark> <a href="#notify" id="notify"></a>

Opens the notification position editor. The editor allows the player to:

* Preview the notification
* Drag and move it freely on screen
* Save the position
* Reset it to the default config position
* Close the editor

The saved position is stored locally using **KVP**.

***

## Test Command

If enabled in the config, the resource also includes a test command to preview notifications.

#### Example

```lua
/testnotify
```

#### Example with type

```lua
/testnotify success Vehicle stored correctly
```

***
