JR10 Posted August 17, 2011 Posted August 17, 2011 Oh. Alright: local r, g, b = getPlayerNametagColor ( player ) local hexColor = string.format ( "#%02X%02X%02X", r, b, b ) outputChatBox ( hexColor.."golkalpfirat: #FFFFFF"..message, 0, 0, 0, true )
gokalpfirat Posted August 17, 2011 Author Posted August 17, 2011 When i use function hideJack(player,command,who,...) local targetPlayer = getPlayerFromName ( who ) local r, g, b = getPlayerNametagColor ( player ) local hexColor = string.format ( "#%02X%02X%02X", r, g, b ) if targetPlayer then local message = table.concat({...}, " ") outputChatBox(getPlayerName(targetPlayer )..""..hexcolor..":"..message ,root,255,255,255,true) end end addCommandHandler("yaziasda",hideJack) I get chat/server.lua:40 attempt to concetenate global 'hexcolor' (a nil value)
JR10 Posted August 17, 2011 Posted August 17, 2011 Because it's hexColor not hexcolor function hideJack(player,command,who,...) local targetPlayer = getPlayerFromName ( who ) local r, g, b = getPlayerNametagColor ( player ) local hexColor = string.format ( "#%02X%02X%02X", r, g, b ) if targetPlayer then local message = table.concat({...}, " ") outputChatBox(getPlayerName(targetPlayer )..""..hexColor..":"..message ,root,255,255,255,true) end end addCommandHandler("yaziasda",hideJack)
JR10 Posted August 20, 2011 Posted August 20, 2011 outputChatBox(hexColor..getPlayerName(targetPlayer )..": #FFFFFF"..message ,root,255,255,255,true)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now