---
description: >-
  This is a detailed setup guide for Advanced Notification. If you have any
  questions before making a purchase, you can contact us on Discord
---

# Setup

## Config

* Notification Panel Settings\
  \
  \- You can enable/disable the notification panel\
  \- Add a command to open the panel, or you can also open it with a key\
  \- You can customize the design mode \[Customize = Notification customize section | Position =     Notification Position Changer]\
  \
  ![](https://1034396727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXIsRWbAXJHBnjtE4Gxk%2Fuploads%2F2KzhGhfmsqAfio4p7Lad%2Fimage.png?alt=media\&token=b696d034-c4a3-4662-80ab-78c0ed34d50e)\

* Default Notification Settings\
  \
  \- You can set default notification settings, which will apply when you trigger a notification without specifying a notification type, or if that type of notification doesn't exist in CodeStudio.Type\
  \
  ![](https://1034396727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXIsRWbAXJHBnjtE4Gxk%2Fuploads%2FdYiDGy80d6UXxjjgy6gj%2Fimage.png?alt=media\&token=98d4e6a0-92ee-4184-9f48-ba5b3f1b3235)\

*   Adding Standard Notification Types\
    \
    \- You can add unlimited notification types\
    \- Format: &#x20;

    {% code fullWidth="false" %}
    ```lua
    ['type'] = { -- Notification Type
            title = 'Default Title',    -- Add Default Title
            icon = 'icon name',         -- Add Icon Name
            iconColor = '#C53030',      -- Icon Color
    }
    ```
    {% endcode %}

    \
    \- You can refer to [Fontawesome](https://fontawesome.com/icons) for icons \
    \- If you don't specify an icon or icon color, the system will automatically fetch it from CodeStudio.DefaultNotification\


    <figure><img src="https://1034396727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBXIsRWbAXJHBnjtE4Gxk%2Fuploads%2FHrJNEEYg7GA5PUFJnIsl%2Fimage.png?alt=media&#x26;token=8dfa1243-bc42-402d-bc64-0fc6deeb9789" alt=""><figcaption></figcaption></figure>


*   Open Notification Panel\


    {% code title="Client Side Event" fullWidth="true" %}
    ```lua
    TriggerEvent('cs:notify:panel')
    ```
    {% endcode %}
*   Standard Notification Event\


    {% code title="Export Method" %}
    ```lua
    exports['cs_notification']:Notify({
        type = 'twitter',  
        title = 'Twitter',    --Put false if you dont want title
        description = 'This is Sample Notification',
        duration = 3000
    })
    ```
    {% endcode %}



    {% code title="Server Event Method" fullWidth="true" %}
    ```lua
    TriggerClientEvent('cs:notify', source, {
        type = 'twitter',  
        title = 'Twitter',    --Put false if you dont want title
        description = 'This is Sample Notification',
        duration = 3000
    })
    ```
    {% endcode %}



    {% code title="Client Event Method" %}
    ```lua
    TriggerEvent('cs:notify', {
        type = 'twitter',  
        title = 'Twitter',    --Put false if you dont want title
        description = 'This is Sample Notification',
        duration = 3000
    })
    ```
    {% endcode %}
*   Custom Notification Event\


    ```lua
    TriggerEvent('cs:notify', {
        type = 'facebook',
        title = 'Facebook',
        description = 'This is Customised Notification',
        duration = 3000,
        style = {
            backColor = '#3a6ecf',
            textColor = "#fff"
        }
    })
    ```





## Setup Guide Example for QBCore and ESX

*   For QB: Replace **QBCore.Functions.Notify** with this  :arrow\_down:\


    ```lua
    function QBCore.Functions.Notify(text, texttype, length)
        TriggerEvent('cs:notify', {
            type = texttype,
            title = false,
            description = text,
            duration = length
        })
    end
    ```



*   For ESX: Replace **ESX.ShowNotification** with this  :arrow\_down:\


    ```lua
    function ESX.ShowNotification(message, type, length)
        TriggerEvent('cs:notify', {
            type = type,
            title = false,
            description = message,
            duration = length
        })
    end
    ```
