in nametags.lua i put this:
r,g,b=getPlayerNametagColor(player)
and then it has this code:
dxDrawText (getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false )
and in the same file, in the end, i added this:
function process()
players=getElementsByType("player")
for _,v in pairs(players) do
processPlayer(v)
end
end
function processPlayer(p)
local Player=source or p
local nick=getPlayerName(Player)
local colorcode=nick:match("^#%x%x%x%x%x%x")
if colorcode then
local red,blue,green=getColorFromString(colorcode)
setPlayerNametagColor(Player,red,blue,green)
end
setPlayerName(Player,nick:gsub("#%x%x%x%x%x%x",""))
end
addEventHandler("onResouceStart",getResourceRootElement(),process)
addEventHandler("onPlayerJoin",getRootElement(),processPlayer)
addEventHandler("onPlayerChangeNick",getRootElement(),processPlayer)
and with this it appears light green