# How to use

## Displaying a notification

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

```lua
TriggerEvent('zcmg_advanced-notify:open', title, message, time, type)
```

{% endtab %}

{% tab title="Server" %}

```lua
TriggerClientEvent('zcmg_advanced-notify:open', source, title, message, time, type)
```

{% endtab %}
{% endtabs %}

#### Variables:

title: The title you want to give the notification (can be empty)

message: Notification message (html tags can be used)

time: Notification display time (value in milliseconds (ms))

type: Notification type

* success (<mark style="color:green;">green</mark>)
* info (<mark style="color:blue;">blue</mark>)
* error (<mark style="color:red;">red</mark>)
* warning (<mark style="color:yellow;">yellow</mark>)

{% tabs %}
{% tab title="Client Example" %}

```lua
TriggerEvent('zcmg_advanced-notify:open', 'Success', 'Notification System by <span style="color:#1ca800">ZCMG</span>!', 4500, 'success')
```

{% endtab %}

{% tab title="Server Example" %}

```lua
TriggerClientEvent('zcmg_advanced-notify:open', source, 'Warning', 'Notification System by ZCMG!', 4000, 'warning')
```

{% endtab %}
{% endtabs %}

## Fixed Notification

Allows you to leave a notification always fixed until it is turned off. Only a fixed notification.

Time variable:

on: Turn ON the notification

off: Turn OFF the notification

{% tabs %}
{% tab title="Turn ON" %}

```lua
TriggerEvent('zcmg_advanced-notify:open', 'INFO', 'Notification System by <span style="color:#1c77ff">ZCMG</span>!', 'on', 'info')
```

{% endtab %}

{% tab title="Turn OFF" %}

```lua
TriggerEvent('zcmg_advanced-notify:open', "", "", 'off', '')
```

{% endtab %}
{% endtabs %}
