> For the complete documentation index, see [llms.txt](https://mekez-dev.gitbook.io/mekez-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mekez-dev.gitbook.io/mekez-dev/paid-resources/notify-v2/usage.md).

# Usage

### 🎨 Notification Types

Default notification types:

* success - Green notification for successful actions
* error - Red notification for errors
* warning - Orange notification for warnings
* info - Blue notification for information

### Client Side&#xD;

```lua
exports['mkz-notify2']:SendNotification({
    title = 'Title',
    message = 'Message',
    type = 'type',
    duration = 5000,
    sound = true
})
```

### Server Side

To send to a specific player (source is the player ID)

```lua
-- Send to specific player
exports['mkz-notify2']:SendNotificationToPlayer(source, {
    title = 'Title',
    message = 'This is a notification message',
    type = 'success',
    duration = 5000,
    sound = true
})
```

To send to all players

```lua
-- Send to all players
exports['mkz-notify2']:SendNotificationToAll({
    title = 'Announcement',
    message = 'Server-wide message',
    type = 'warning',
    duration = 5000,
    sound = true
})
```
