# Tutorials

[How to fix blue chat background?](#id-1)

[How to use chat notifications in other scripts?](#id-2)



#### 1.

{% hint style="info" %}
**How to fix blue chat background?**
{% endhint %}

{% hint style="danger" %}
**DO NOT DELETE THE SYSTEM\_RESOURCES CHAT**
{% endhint %}

1. Download chat file from the [Installation Guide](installation-guide).
2.  Add the following into server.cfg, make sure chat resource starts before fivecode\_rpchat

    ```
    ensure chat
    ensure fivecode_rpchat
    ```

{% hint style="warning" %}
**If default chat box is still present do the following:**
{% endhint %}

1.  Go into server.cfg server file and change the following

    <pre><code><strong>original:
    </strong>set resources_useSystemChat true

    <strong>changed:
    </strong>set resources_useSystemChat false
    </code></pre>

#### 2.

{% hint style="info" %}
**Use chat notifications in other scripts:**
{% endhint %}

{% tabs %}
{% tab title="Client" %}
```lua
-- 1: Notification Type - (success, info, error)
-- 2: Notification message
-- 3: If true everyone in the server will see this message.

exports.fivecode_rpchat:Notify(type, message, everyone)
```
{% endtab %}

{% tab title="Server" %}
```lua
-- 1: Player source
-- 2: Notification Type - (success, info, error)
-- 3: Notification message
-- 4: If true everyone in the server will see this message.

exports.fivecode_rpchat:Notify(source, type, message, everyone)
```
{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Notification types:**
{% endhint %}

{% tabs %}
{% tab title="Success" %}
{% hint style="success" %}
**Success Notification**
{% endhint %}

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2FRPbWCbl3g504oD0alWF1%2Fexample%20success%20notif%20fivecode_rpchat.png?alt=media&#x26;token=c6ba10c1-346c-41c2-b81f-6c01ba7d9005" alt=""><figcaption><p>Config.ChatStyle = 'styleModern2'</p></figcaption></figure>

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2FAiW7RlQeEF8fmGceoaIk%2Fexample%20success%20notif%20fivecode_rpchat%20style2.png?alt=media&#x26;token=fb5c606a-549a-47e2-a3b8-85f15ad8dfa9" alt=""><figcaption><p>Config.ChatStyle = 'styleModern'</p></figcaption></figure>

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2FRlUtK5Od6vVLJlBDgt3J%2Fexample%20success%20notif%20fivecode_rpchat%20style3.png?alt=media&#x26;token=a79f94aa-b544-47bc-80d4-88c3a55cef9d" alt=""><figcaption><p>Config.ChatStyle = 'styleNormal'</p></figcaption></figure>
{% endtab %}

{% tab title="Info" %}
{% hint style="info" %}
**Info Notification**
{% endhint %}

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2FIXzc0w94Bqax5XrJN6VL%2Fexample%20info%20notif%20fivecode_rpchat.png?alt=media&#x26;token=7a0c7a73-0613-4eb3-a3cf-4119373709a0" alt=""><figcaption><p>Config.ChatStyle = 'styleModern2'</p></figcaption></figure>

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2FjSSiabArSL4RTVosMhUi%2Fexample%20info%20notif%20fivecode_rpchat%20style2.png?alt=media&#x26;token=515c4aba-12f3-4b56-a8ce-afe81d696905" alt=""><figcaption><p>Config.ChatStyle = 'styleModern'</p></figcaption></figure>

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2FI77lsKbyGcNF5EvhzmMD%2Fexample%20info%20notif%20fivecode_rpchat%20style3.png?alt=media&#x26;token=cfb4137a-1640-494b-8f0c-e50763ebdf8c" alt=""><figcaption><p>Config.ChatStyle = 'styleNormal'</p></figcaption></figure>
{% endtab %}

{% tab title="Error" %}
{% hint style="danger" %}
**Error Notification**
{% endhint %}

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2FUpcHp19tpzDfV78wktzJ%2Fexample%20error%20notif%20fivecode_rpchat.png?alt=media&#x26;token=8f899dc2-26b5-4e0a-b90d-2cba5bd63aa4" alt=""><figcaption><p>Config.ChatStyle = 'styleModern2'</p></figcaption></figure>

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2Fri7jtwtAbUT3FuPQ4nD4%2Fexample%20error%20notif%20fivecode_rpchat%20style2.png?alt=media&#x26;token=3004badc-371c-4464-bccb-07ce66ac69da" alt=""><figcaption><p>Config.ChatStyle = 'styleModern'</p></figcaption></figure>

<figure><img src="https://3653526283-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0JI0UZcO9D2EyXo9ib4X%2Fuploads%2Fca3Lpd4qtTWKU0ctjHBh%2Fexample%20error%20notif%20fivecode_rpchat%20style3.png?alt=media&#x26;token=58d22a75-6d5f-46f4-8e92-b8f9826e52d4" alt=""><figcaption><p>Config.ChatStyle = 'styleNormal' </p></figcaption></figure>
{% endtab %}
{% endtabs %}
