How To
Adding Custom Chat Feautures To mChat Resource
How To Add Chat Messages
-- Please be aware this is a server-side example
local messageData = {
args = {GetPlayerRoleplayName(source), message}, -- first index is author name second one is message (author name is not required you can just put message too)
tags = {"ooc", "police"}, -- tags that will shown in the message (you can see all avaliables tags in Config.Tags or you can add your own custom tag in Config.Tags)
playerId = source, -- Server ID of the message owner (this is not required you can just delete this if you don't have an id)
channel = 'ooc', -- Channel name that message will be sent (default channels are "ooc", "me", "do", "pm", "server")
}
TriggerClientEvent('chat:addMessage', -1, messageData)How To Add Chat Channel
-- Please be aware this is a server-side example
-- Give access and create channel for player
TriggerClientEvent('mChat:ToggleCustomChatAccess', source, {
name = 'mycustomchannel', -- channel name
label = "CUSTOM_CHANNEL", -- channel label
show = true,
})
-- Remove access and delete channel from player
TriggerClientEvent('mChat:ToggleCustomChatAccess', source, {
name = 'mycustomchannel', -- channel name
show = false,
})How To Add Chat Tags With Discord Roles



Last updated