Alright so I am new to scripting and don't know much but I am slowly learning.
The current code I have so far:
local msg_red,msg_green,msg_blue = 255,255,0
function servertalkprivate(message, sendto)
outputChatBox(tostring(message), sendto, msg_red, msg_green, msg_blue, true)
end
function servertalk(message)
servertalkprivate(message, getRootElement())
end
function onJoin()
servertalkprivate("MESSAGE1", source)
servertalkprivate("MESSAGE2", source)
end
addEventHandler("onPlayerJoin",getRootElement(),onJoin)
I want it to display MESSAGE2 in a different color, The closest I have come to making this happen was:
local msg_red,msg_green,msg_blue = 255,255,0
local msg2_red,msg2_green,msg2_blue = 39,26,225
function servertalkprivate(message, sendto)
outputChatBox(tostring(message), sendto, msg_red, msg_green, msg_blue, true)
outputChatBox(tostring(message), sendto, msg2_red, msg2_green, msg2_blue, true)
end
function servertalk(message)
servertalkprivate(message, getRootElement())
end
function onJoin()
servertalkprivate("MESSAGE1", source)
servertalkprivate("MESSAGE2", source)
end
addEventHandler("onPlayerJoin",getRootElement(),onJoin)
However while that works, It displays MESSAGE1 and MESSAGE2 twice in the chatbox which is not what I wanted to happen lol...... Anyways any help on this would be greatly appreciated.