# Usage

{% hint style="info" %}
**Each notification call should consist of following:**

* Type - one of 5 notifications types *(see Features)*
* Title - notification title
* Text - notification text
* Time - how long should the notification stay on screen (in miliseconds)
* Sound - should the sound be played (true/false)
  {% endhint %}

## There are two ways of sending a notification:

### By event:

#### *Triggering on client side:*

<pre class="language-lua"><code class="lang-lua"><strong>TriggerEvent('pc_notifications:Notify', type, title, text, time, true) 
</strong></code></pre>

#### *Triggering on server side:*

```lua
TriggerClientEvent('pc_notifications:Notify', playerId, type, title, text, time, true) 
```

### By export:

```lua
exports['pc_notifications']:Notify(type, title, text, time, true)
```


---

# 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.poisoncode.com/scripts/pc_notifications/usage.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.
