Jump to content

Colour showing for player.


Admigo

Recommended Posts

Posted

Try this not sure if work or not

function Me (thePlayer) 
    local players = getElementsByType("player") 
    for k,v in ipairs(players) do 
            if v == getLocalPlayer() then else 
            local r = getElementData(v,"red") 
            local g = getElementData(v,"green") 
            local b = getElementData(v,"blue") 
            setPlayerNametagColor ( thePlayer, r, g, b ) 
end 
addCommandHandler ( "myColor", Me ) 

Posted
Try this not sure if work or not
function Me (thePlayer) 
    local players = getElementsByType("player") 
    for k,v in ipairs(players) do 
            if v == getLocalPlayer() then else 
            local r = getElementData(v,"red") 
            local g = getElementData(v,"green") 
            local b = getElementData(v,"blue") 
            setPlayerNametagColor ( thePlayer, r, g, b ) 
end 
addCommandHandler ( "myColor", Me ) 

I dont need a command for it.

I just want to change the colour from nametag that changes to the nickname colored(hex Colour in nick) when the player joins server.

Posted

wtf you dont even know how to add an sample event ?

function Me (thePlayer) 
    local players = getElementsByType("player") 
    for k,v in ipairs(players) do 
            if v == getLocalPlayer() then else 
            local r = getElementData(v,"red") 
            local g = getElementData(v,"green") 
            local b = getElementData(v,"blue") 
            setPlayerNametagColor ( thePlayer, r, g, b ) 
end 
addEventHandler("onClientPlayerJoin", getRootElement(), Me) 

Posted
Admigo: You want to enable HEX colours in nametag? if so, that's not possible, you must create a custom nametag for that.

Already fixed,thanks for help;)

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...