I want to make a plug-in that changes the colour of the text that i pass to the command.
I know that there are plug-ins that all ready do this, but there is nothing like a plug made at home.
My problem is that i canīt use the (!fcxx) tag, i know that i must use the sCCColor constant, but i donīt know how to.
Please if anyone can help me, i would be glad
Manuel
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
RE: Help With a Text Plug-In
In VB, just use the normal string concatenation. You may need to use Char() as well, I can't remember.
In C++, you'll have to use strcat() to get the same effect.
Follow the sCCColor by two comma separated numbers. The first is foreground, the second background. Any number from 0 to 63 can be used (0 to 15 for Plus 2). I recommend using a leading zero on single digits: it will limit possible bugs.
This post was edited on 07-25-2004 at 08:20 PM by RaceProUK.
Posts: 4714 Reputation: 42
43 / /
Joined: Jan 2003
RE: Help With a Text Plug-In
quote:Originally posted by raceprouk
You may need to use Char() as well, I can't remember.
true
quote:Originally posted by raceprouk
Any number from 0 to 63 can be used
the formats (RRR,GGG,BBB) and #RRGGBB are also allowed for colors. In the 1st format, the letters are 3-ditigs decimal numbers (like (054,005,255)) and in the 2nd format they're hexadecimal digits (like in #3366cc)
Posts: 4714 Reputation: 42
43 / /
Joined: Jan 2003
RE: Help With a Text Plug-In
quote:Originally posted by manuelnaranjo
I concat that colour with the text i want to send???
yes. You have to create a string that has the sCCColor character followed by the color code and followed by the text you want in that color. For example:
"Hello X#3366ccWorld"
^in that string, suppose that the X is the sCCColor character. Well, that string will be displayed like this:
Hello World