> For the complete documentation index, see [llms.txt](https://jixelpatterns.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jixelpatterns.gitbook.io/docs/dependency/jim_bridge/notifications.md).

# Notifications

## notify.lua

This module provides a unified interface to trigger styled notifications across supported frameworks.

### **triggerNotify(title, message, type, src)**

Sends a notification to a player (or to the client if `src` is `nil`).

When used in the server side, it requires the `src` of the player to know where it supposed to trigger

When used in the client side, `src` should be set to \`nil\`

{% hint style="info" %}
The notification style is determined by `type` (e.g., `success`, `error`, `info`).
{% endhint %}

{% hint style="warning" %}
What script is used for notifications is decided per script in their config file.

Or if you set global [convars](/docs/dependency/jim_bridge.md#optional) in the server.cfg
{% endhint %}

The supported settings for the config/convars are

```
  • okok
  • qb
  • ox
  • gta (default)
  • esx
```

**Parameters:**

* `title` (`string`): The title or header of the notification.
* `message` (`string`): The body or detail text.
* `type` (`string`): Type of message (e.g., "success", "error", "info").
* `src` (`number`, optional ): Server ID of the player to notify (omit to notify locally).

**Example:**

```lua
-- Client-side usage without specifying a player (shows to the current player)
triggerNotify("Success", "You have completed the task!", "success")

-- Server-side usage specifying a player by their server ID
triggerNotify("Alert", "You have been warned for misconduct.", "error", source)
```

***
