AddMessage

This export creates a message accordingly to how UI handles it. It should be triggered from client side, since the crucial part is we're handling who should receive the message.

Export handling

exports['ZSX_UIV2']:AddMessage(icon, message, color, anonymous, proximity, header, jobWhitelisted, targetPlayer)
Arg
Information
Optional

icon

String Icon for the point. List of icons.

message

String Text of the message.

color

String Hex color of the message.

anonymous

Boolean Message should be anonymous or not.

proximity

Number Distance using game units.

header

String Custom header text.

jobWhitelisted

Object Array of jobs that should only receive the message.

targetPlayer

Number Source of the target player.

Example of Twitter with custom header as "Twitter"

exports['ZSX_UIV2']:AddMessage('fab fa-twitter', argsOutput, '#64A6FD', false, false, 'Twitter')

argsOutput here is the variable that contains the message.

Event

You can also use it as event:

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

Last updated