# Installation

{% hint style="info" %}
**QBCore  (client/functions.lua)**
{% endhint %}

```lua
function QBCore.Functions.Notify(text, texttype, length)
    exports['ph-notify']:Notify(texttype or 'info', 'SYSTEM', text, length)
end
```

```lua
-- Simple Info
exports['ph-notify']:Notify('info', 'SYSTEM', 'Welcome to the server!')

-- Warning with custom time
exports['ph-notify']:Notify('warning', 'FUEL', 'Your tank is almost empty.', 7000)
```

{% hint style="info" %}
**ESX Version (client/functions.lua)**
{% endhint %}

* <mark style="color:$warning;">**Option 1**</mark>**&#x20;— ESX style override (recommended)**\
  **add this in a client file that loads early:**

```lua
function ESX.ShowNotification(text, texttype, length)
    exports['ph-notify']:Notify(texttype or 'info', 'SYSTEM', text, length)
end
```

* **Then anywhere in ESX you can use:**

```lua
ESX.ShowNotification('Hello from ESX!', 'success')
Option 2 — Custom ESX Notify Function (safer)
```

* <mark style="color:$warning;">**Option 2**</mark>**&#x20;— Custom ESX Notify Function (safer)**
* **If you don’t want to override ESX default:**

```lua
ESX = ESX or {}

ESX.Notify = function(text, texttype, length)
    exports['ph-notify']:Notify(texttype or 'info', 'SYSTEM', text)
end
```

**Usage:**

```lua
ESX.Notify('Hello from ESX!', 'error')
```
