Code: Select all
nameColorizer = string.format("\255\%s\%s\%s", R255, G255, B255)
messageColorizer = string.format("\255\255\255\255")
message1 = nameColorizer .. myPlayerName .. messageColorizer .. " has now sent " .. DM*10 .. " of his machines to metalhell"
Spring.Echo(message1)
R255 etc. are the player's colours in 0-255 (instead of 0-1 as given by Spring.teamColor)
**Originally I tried other methods, with the same result:
Code: Select all
nameColorizer = "\255\" .. R255 .. "\" .. G255.. "\" .. B255
As far as I can tell, it doesn't interpret the nameColorizer string in the same way as it does for messageColorizer (which makes the rest of the message white). Any ideas on how to get this to work?