Using this export allows you to add modes to your chat.
Mode object structure:
message = {
name = name,
displayName = displayName,
color = color,
seObject = seObject,
cb = cb
}
registerMode
object modeData
This example adds a admin chat for all players with the permission admin.chat
.
exports.chat:registerMode({
name = "adminChat",
displayName = "Admin",
color = "#fca503",
seObject = "admin.chat",
cb = function(source, message, cbs)
cbs.updateMessage({
template = "[ADMIN]" .. ' {}'
})
cbs.setSeObject("admin.chat")
end
})