Added styles support, fixed messages with no author, removed JQuery dep

This commit is contained in:
Jonas Dellinger
2017-05-26 00:51:34 +02:00
parent e750bbfac1
commit afa0b5bab2
6 changed files with 40 additions and 12 deletions

View File

@@ -13,15 +13,16 @@ RegisterNetEvent('_chat:messageEntered')
--deprecated, use chat:addMessage
AddEventHandler('chatMessage', function(author, color, text)
if author == "" then
author = false
local args = { text }
if author ~= "" then
table.insert(args, 1, author)
end
SendNUIMessage({
type = 'ON_MESSAGE',
message = {
color = color,
multiline = true,
args = { author, text }
args = args
}
})
end)