I'm using the default joinquit resource and i want to edit the message colors for when a player quits the server and when he's changing he's nick. I've done it with "has joined the game" but i tried to do the same with other two messages and it doesn't work. I want the player names in these messages to be white color. I want to be like this:
"#006400∙ #FF0000[Player name] #006400has left the game [#FF0000Quit#006400]
"#006400∙ #FF0000[Player current name] #006400is now known as #FF0000[New player name]
How can i edit it?
function nickChangeMessage(oldNick, newNick)
if (showColorCodes) then
outputChatBox(getDefaultColor().."#006400∙ "..getHexFriendlyNick(source, oldNick)..getDefaultColor().." #006400is now known as "..getHexFriendlyNick(source, newNick), root, 255, 100, 100, true)
else
outputChatBox("#006400∙ "..oldNick.." #006400is now known as "..newNick, root, 255, 100, 100)
end
end
addEventHandler("onPlayerChangeNick", root, nickChangeMessage)
function leftMessage(reason)
if (showColorCodes) then
outputChatBox(getDefaultColor().."#006400∙ "..getHexFriendlyNick(source, getPlayerName(source))..getDefaultColor().." #006400has left the game ["..reason.."]", root, 255, 100, 100, true)
else
outputChatBox("#006400∙ "..getPlayerName(source).." #006400has left the game ["..reason.."]", root, 255, 100, 100)
end
end
addEventHandler("onPlayerQuit", root, leftMessage)