-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Tested games: CSGO, CS:S
I usually send a prefixed and colored SayText2 message like this:
from colors import WHITE
from colors import ORANGE
SayText2(
f'{ORANGE}[{WHITE}My Plugin Name{ORANGE}] {WHITE}My message ....
).send(some_index)This works for CS:S, but it doesn't for CSGO. It shows the following chat message all in red instead: FFA500[FFFFFFMy Plugin NameFFA500] FFFFFFMy message ..... This tells me that these colors simply can only be used on entities in CSGO. I'm not sure if there have been plans to 'fix' this 'issue'.
My question is: Should we separate entity colors and message colors?
A quick and dirty solution could be:
# messages/message_colors.py
from core import GAME_NAME
if GAME_NAME == 'csgo':
WHITE = '\x01'
# more...
else:
from colors import WHITE
# more...This could all be done in a much cleaner way using data files etc. so conflicts don't occur, of course. Is something in the works for this? If not, I could try to figure out a way.
I personally think it should be integrated, so scripters don't have to think about how to color their messages, but simply do it in a standard way.