This client export adds a message to the chat of the resource that calls it.
It behaves the same as triggering chat:addMessage, but reads better when
you’re already calling into the chat resource through exports rather than
raising events.
Export Name
addMessageParameters
- object|string message: Same shape as the
chat:addMessagemessage, withtemplate,color,multiline, andargsfields
Example
AddEventHandler('onResourceStart', function(resourceName)
if GetCurrentResourceName() ~= resourceName then return end
exports.chat:addMessage({
color = { 255, 0, 0 },
args = { 'SYSTEM', string.format('%s has started.', resourceName) }
})
end)