Author Topic: Default tsay colour?  (Read 2703 times)

0 Members and 1 Guest are viewing this topic.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Default tsay colour?
« on: September 11, 2016, 07:48:59 AM »
Just wondering, what is the default colour for things like tsay? It's sort of a blue-ish (teal?) colour, but I was wondering what it was to make everything consistent in this script I'm writing.


EDIT: If I'm correct, it's the same colour that Garry's Mod uses for server messages (like this example?)
« Last Edit: September 11, 2016, 07:52:23 AM by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Default tsay colour?
« Reply #1 on: September 11, 2016, 08:24:03 AM »
ULib.tsay uses ChatPrint for client consoles, and Msg for server. (Code block found here)
As far as I can find, we don't touch those colors, so you'd need to look up Gmod source code somewhere.

ULib.tsayError uses ULib.tsayColor, with color specified as a red Color( 255, 140, 39 )
(Code block found here)
ULib.tsayColor seems to default to 128, 128, 128 (white?) if no parameters are passed as expected.

Simplest answer - use Chatprint for client and Msg for server and you'll be color matched automatically.
« Last Edit: September 11, 2016, 08:28:13 AM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Default tsay colour?
« Reply #2 on: September 11, 2016, 08:29:12 AM »
The thing is, I was trying to use tsayColor to show how much health someone has left, and I wanted the health to be green while all the rest was the same colour... but I can't figure out what the colour is.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given