Colour script help (FiveM, chat)

Hello guys. I have a really big problem for me… :wink:

  • Im new to script, i have seen some youtube videos and like that… But heres is my problem:
    I will have so only “TWITTER” is blue. But now; the my name and Twitter is blue. where do i have to put the colour code anyone there can give me a hint? that would be nice :slight_smile:
  • I know the color code isent blue now :wink:

AddEventHandler(‘chatMessage’, function(source, name, msg)
sm = stringsplit(msg, " ");
if sm[1] == “/tweet” then
CancelEvent()
TriggerClientEvent(‘chatMessage’, -1, "TWITTER | " … name, { 128, 128, 128 }, string.sub(msg,5))
end
end)

function stringsplit(inputstr, sep)
if sep == nil then
sep = “%s”
end
local t={} ; i=1
for str in string.gmatch(inputstr, “([^”…sep…"]+)") do
t[i] = str
i = i + 1
end
return t
end

Anyone please…
sorry for bump

Try:

TriggerClientEvent(‘chatMessage’, -1, "^4TWITTER^0 | " … name, { 255, 255, 255 }, string.sub(msg,5))


Tutorial Chat Formatting

1 Like