Chat colors

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Chat colors

Postby velocity » Sun Feb 19, 2017 5:14 pm

Syntax: Select all

import colors
from messages import SayText

SayText('{}Hello'.format(colors.WHITE)).send()


Simple code and it works, but how do I avoid FFF000F in console?
User avatar
Kill
Member
Posts: 88
Joined: Wed Aug 31, 2016 10:05 pm

Re: Chat colors

Postby Kill » Sun Feb 19, 2017 6:45 pm

velocity wrote:

Syntax: Select all

import colors
from messages import SayText

SayText('{}Hello'.format(colors.WHITE)).send()


Simple code and it works, but how do I avoid FFF000F in console?



Try using sayText2.
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Re: Chat colors

Postby velocity » Sun Feb 19, 2017 7:03 pm

Not really a solution, by not writing anything in console at all
User avatar
Kill
Member
Posts: 88
Joined: Wed Aug 31, 2016 10:05 pm

Re: Chat colors

Postby Kill » Sun Feb 19, 2017 7:58 pm

velocity wrote:Not really a solution, by not writing anything in console at all


But does it write in chat in colors?
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Re: Chat colors

Postby velocity » Sun Feb 19, 2017 8:22 pm

Sure
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: Chat colors

Postby Ayuto » Mon Feb 20, 2017 6:47 pm

You can send the colored message using SayText2 and then send the uncolored message via core.echo_console().
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Re: Chat colors

Postby velocity » Mon Feb 20, 2017 11:06 pm

:(

Return to “Plugin Development Support”

Who is online

Users browsing this forum: Bing [Bot] and 34 guests