Mission Event: ChatMessageReceived
Description: Fires when a message is received, before adding it to the chat feed. Return true to block a message from being added to the chat feed.
Parameters:
- index: Number - The channel index the message was sent in (indexes as per currentChannel, -1 for system)
- sender id: Number - Owner ID of the sender
- sender name: String - Name of the sender
- message: String - The message contents
Example:
addMissionEventhandler ["ChatMessageReceived",{ params ["_index","_senderID","_senderName","_message"]; }];
Parameter Examples:
https://i.imgur.com/kHXr0D6.png
[0,3,"Connor","""my globalChat message"""] [0,3,"Connor","my global message"] [1,3,"Connor","my side message"] [5,3,"Connor","my direct message"]
https://i.imgur.com/ejdqYw0.png
[-1,2,"","BattlEye Client: (Global) Admin: my rcon message"] [-1,2,"","Player Connor (2) connecting"] [-1,2,"","Player Connor (2) connected"] [-1,2,"Connor","Player Connor (2) kicked off: "] [-1,2,"","Player Connor (2) disconnected"]