> For the complete documentation index, see [llms.txt](https://zsx-development.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://zsx-development.gitbook.io/docs/resources/user-interface-v2/exports/interfaces/chat/addusermessage.md).

# AddUserMessage

This export was created to allow you to manually handle who should receive the message.\
Works almost the same as previously chat:addMessage.

### Export handling

```lua
exports['ZSX_UIV2']:AddUserMessage(icon, message, color, anonymous, proximity, header)
```

<table><thead><tr><th width="160">Arg</th><th width="483">Information</th><th data-type="checkbox">Optional</th></tr></thead><tbody><tr><td>icon</td><td><mark style="color:green;">String</mark><br>Icon for the point. List of <a href="https://fontawesome.com/v5/search">icons</a>.</td><td>false</td></tr><tr><td>message</td><td><mark style="color:green;">String</mark><br>Text of the message.</td><td>false</td></tr><tr><td>color</td><td><mark style="color:green;">String</mark><br>Hex color of the message.</td><td>false</td></tr><tr><td>anonymous</td><td>Boolean<br>Message should be anonymous or not.</td><td>false</td></tr><tr><td>proximity</td><td><mark style="color:blue;">Number</mark><br>Distance using game units.</td><td>true</td></tr><tr><td>header</td><td><mark style="color:green;">String</mark><br>Custom header text.</td><td>true</td></tr></tbody></table>

### Event

You can also use it as event:

```lua
TriggerEvent('ZSX_UIV2:Chat:AddUserMessage', 'fab fa-twitter', argsOutput, '#64A6FD', false, false, 'Twitter')
```
