Jump to content

Namecolor Player !


//_Dragon

Recommended Posts

Posted

Hey , i want add namecolor player in this script like when player namecolor has color blue when he talk to chat his name blue will be showing with the color blue :/

function globalMessage(thePlayer, cmd, ...)

local message = table.concat ( { ... }, " " )

local name = getPlayerName(thePlayer)

outputChatBox("(Local) "..name..": #ffffff"..message, getRootElement(), 255, 255, 255, true)

end

addCommandHandler("Local", globalMessage)

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

Posted

thy this :wink:

function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local name = getPlayerName(thePlayer) 
local r, g, b = getTeamColor(thePlayer) 
outputChatBox("(Local) "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

Posted
thy this :wink:
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local name = getPlayerName(thePlayer) 
local r, g, b = getTeamColor(thePlayer) 
outputChatBox("(Local) "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

Not working dude

help ?

Posted (edited)

Debugscript problem in GetPlayerNametagColor :/

http://imgur.com/WZ5fBPD

function globalMessage(thePlayer, cmd, ...) 
    local message = table.concat ( { ... }, " " ) 
    local name = getPlayerName(thePlayer) 
    local r,g,b = getPlayerNametagColor (player) 
    outputChatBox("(Local) "..name..": #ffffff"..message, getRootElement(), r, g, b, true ) 
    end 
addCommandHandler("Local", globalMessage) 

Edited by Guest
Posted

maybe that, and maybe definition "Source or thePlayer"

function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local name = getPlayerName(source) 
local r,g,b = getPlayerNametagColor ( source ) -- add 
outputChatBox("[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

Posted
maybe that, and maybe definition "Source or thePlayer"
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local name = getPlayerName(source) 
local r,g,b = getPlayerNametagColor ( source ) -- add 
outputChatBox("[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

Bro ur code is not working mine is working Only i have problem in getPlayerNameTagcolor i hope some one fixe it

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

try this maybe it can work

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

try this maybe it can work

Work perfect thanks but i want add color in [local] like Ex : #FF0000[Local] "..name.." but when i do it nameplayer too has taked the color ( red #FF0000 )

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

try this maybe it can work

Work perfect thanks but i want add color in [local] like Ex : #FF0000[Local] "..name.." but when i do it nameplayer too has taked the color ( red #FF0000 )

outputChatBox("[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 

check this out again maybe the wrong is there

Posted (edited)

maybe is possible ?

local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
local color = r,g,b 
outputChatBox("#ffffff[Local]"..color..""..name..": #ffffff"..message, getRootElement(), r, g, b, true) 

is possible? :lol::lol:

Edited by Guest
Posted
The only thing that is possible is to let the local be the same color as the player color, but random color no

But dude i join server & i see the owner has make the [local] with color yellow & nametagplayer it's different u wanna see pic ?

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("#FF0000[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

try this one maybe it could work

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("#FF0000[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

try this one maybe it could work

tagplayername has changed to red too :/

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("#FF0000[Local] "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

try this one maybe it could work

tagplayername has changed to red too :/

function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "#FF0000[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("..chat.. "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

try now :D

i wont leave you till i solve it :D

Posted
Doesnt worke bro :/

Nametagcolor take same color's [local]

function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "#FF0000[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("..chat.. "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "#FF0000[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer )  
outputChatBox(" "#FF0000[Local]" "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

debuscript 3 : Loading script failed: Local\server.lua:6: ')' expected near '#'

Problem with ")" i think :3 help ?

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "#FF0000[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer )  
outputChatBox(" "#FF0000[Local]" "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

debuscript 3 : Loading script failed: Local\server.lua:6: ')' expected near '#'

Problem with ")" i think :3 help ?

try the new one i posted.

Posted
function globalMessage(thePlayer, cmd, ...) 
local message = table.concat ( { ... }, " " ) 
local chat = "#FF0000[Local]" 
local name = getPlayerName(thePlayer) 
local r,g,b = getPlayerNametagColor ( thePlayer ) -- add 
outputChatBox("..chat.. "..name..": #ffffff"..message, getRootElement(), r, g, b, true) 
end 
addCommandHandler("Local", globalMessage) 

Nah doesnt work

it show only nametag player

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