Jump to content

[REQ] Colored names


Trickydude19

Recommended Posts

Playercolors seems to use nametag colors to color the chat. However, if a new map is started, this is being reset by mapmanager. Therefore, you need a slight change in the code.

In playercolors.lua (open it with notepad) replace:

addEventHandler ( "onResourceStart", g_ResourceRoot,
function()
for i,player in ipairs(getElementsByType"player") do
		processPlayer ( player )
end
end
)

With:

function applyPlayerColors()
for i,player in ipairs(getElementsByType"player") do
		processPlayer ( player )
end
end
addEventHandler ( "onResourceStart", g_ResourceRoot,applyPlayerColors )
addEventHandler ( "onGamemodeMapStart", g_Root,applyPlayerColors )

This is pretty much the easiest solution. However, the colors will still randomly change after a map change. There are ways around this, but I guess this isn't such a serious issue anyways. (and it probably is a relief for people who get pink as random color)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...