mirror of
https://github.com/citizenfx/cfx-server-data.git
synced 2025-12-12 06:14:09 +01:00
Added styles support, fixed messages with no author, removed JQuery dep
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user