Skip to Content
Cobalt

cobalt_chat

Proximity chat and scoped channels; it also answers as chat.

System

Server

Broadcasts a System message on a channel from config.Channels. ac reaches staff only; the rest reach everyone.

exports.cobalt_chat:System(text, channel)
ParameterTypeOptionalDescription
textstringNo
channelstringYesdefaults to ooc
Example
exports.cobalt_chat:System('Server restart in 10 minutes', 'SYSTEM')

addMessage

Server

Sends a stock-chat message, the same as TriggerClientEvent('chat:addMessage', target, message).

exports.cobalt_chat:addMessage(target, message)
ParameterTypeOptionalDescription
targetintegerNoserver id, or -1 for everyone
messagestring | ChatLegacyMessageNo
Example
exports.cobalt_chat:addMessage(source, 'Vehicle stored in Legion Square garage')

On this page