MOTD / Centerprint
Moderator: InsideQC Admins
8 posts
• Page 1 of 1
MOTD / Centerprint
Wanting to know if this is possible....so far its not working....the last centerprint seems to be overriding the prior centerprints. Idea is to have like a header and footer for the motd, and in the middle are your whatever/help messages - etc.
Tried messing with centerptint2 and 3 as you can see, seems to make no difference.
- Code: Select all
void () cprintheader =
{
centerprint (self, "ÔåëÂïô…ÃÔÆ+ ‹<Öåòº.>‹\nBased on CTFBOT+ 0399 by A. Distler\n\nNO BOTS ALLOWED!!\n\n");
};
void () cprintfooter =
{
centerprint3 (self, "\n ËМÁÒÒÏ×BACK ËМÁÒÒÏ×NEXT‘ For more help.\n\nServer's Homepages\nhttp://www.blahblah.com");
};
// Called from this code
if (self.motd_time == 0)
{
cprintheader ();
centerprint2 (self, " WELCOME ! Please read all the help pages before you play. \n [F5] Fade in and observe [F6] Bot TV. [1] Join Red team [2] Join Blue team [SPACE] Automatic team\n");
cprintfooter ();
}
Tried messing with centerptint2 and 3 as you can see, seems to make no difference.
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
Re: MOTD / Centerprint
You need to do it from one centerprint pass. i.e. an example from frikbot:
Then just have your header, footer, and message as separate strings.
- Code: Select all
void(entity client, string s1, string s2, string s3, string s4, string s5, string s6, string s7) frik_big_centerprint = #73;
Then just have your header, footer, and message as separate strings.
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Re: MOTD / Centerprint
Thanks guys for the sugguestions....I went with the frik cprint with only 3 strings.
Tough thing about copying the ascii quake charset in a text editor like notepad++ is when you use syntax highlighting, it can be a challenge
to not delete an invisible character. I wind up using this alot: http://www.quakebrasil.com.br/oqnm4/index.htm
....but one day I want to make a desktop utility that is more modernized >>
viewtopic.php?t=4271
Tough thing about copying the ascii quake charset in a text editor like notepad++ is when you use syntax highlighting, it can be a challenge
to not delete an invisible character. I wind up using this alot: http://www.quakebrasil.com.br/oqnm4/index.htm
....but one day I want to make a desktop utility that is more modernized >>
viewtopic.php?t=4271
Dr. Shadowborg wrote:You need to do it from one centerprint pass. i.e. an example from frikbot:
- Code: Select all
void(entity client, string s1, string s2, string s3, string s4, string s5, string s6, string s7) frik_big_centerprint = #73;
Then just have your header, footer, and message as separate strings.
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
Re: MOTD / Centerprint
if you're using fteqcc, you can use strings like: "this is white \sthis is red\s and this is white again" to make red text. the \s is not a character, but instead toggles between white and 'special' text. its only useful for printable chars, of course, but should greatly boost readability.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Re: MOTD / Centerprint
Im using Frikqcc. The centerprint I tried cannot display the right characters from the quake charset, IE:
ÔåëÂïô…ÃÔÆ+ ‹<Öåòº.>
Paste that in your quake console and it ought to display correctly. I noticed a weird thing with the strcat too a few weeks back when trying to join together 2 strings....it was very very picky about how it was called, else it too would display sometimes numbers, not the strings.....
I am wondering if using the WriteString or WriteByte message functions to accomplish this ?
IE: WriteByte (MSG_ONE, 244);
This would start to print character 244, whatever that is. Is there a numeric value for the special characters and the coloring ?
ÔåëÂïô…ÃÔÆ+ ‹<Öåòº.>
Paste that in your quake console and it ought to display correctly. I noticed a weird thing with the strcat too a few weeks back when trying to join together 2 strings....it was very very picky about how it was called, else it too would display sometimes numbers, not the strings.....
I am wondering if using the WriteString or WriteByte message functions to accomplish this ?
IE: WriteByte (MSG_ONE, 244);
This would start to print character 244, whatever that is. Is there a numeric value for the special characters and the coloring ?
Spike wrote:if you're using fteqcc, you can use strings like: "this is white \sthis is red\s and this is white again" to make red text. the \s is not a character, but instead toggles between white and 'special' text. its only useful for printable chars, of course, but should greatly boost readability.
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
Re: MOTD / Centerprint
Cobalt wrote:I am wondering if using the WriteString or WriteByte message functions to accomplish this ?
IE: WriteByte (MSG_ONE, 244);
This would start to print character 244, whatever that is. Is there a numeric value for the special characters and the coloring ?
Yes. Each number refers to an entry in the conchars table, starting horizontally from left to right, and them from top to bottom.
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
Re: MOTD / Centerprint
Ok, yep. I remembered I found an old gif that shows all the values and characters. I edited it today to show the CR/FL (enter key) , but there are still some empty spots that I think maybe are for the backspace or other special functions? SPACE is 32, so what are the rest?
12, 13, 34, 140 , 160 = ?
http://postimage.org/image/888leb16j/
12, 13, 34, 140 , 160 = ?
http://postimage.org/image/888leb16j/
mankrip wrote:Cobalt wrote:I am wondering if using the WriteString or WriteByte message functions to accomplish this ?
IE: WriteByte (MSG_ONE, 244);
This would start to print character 244, whatever that is. Is there a numeric value for the special characters and the coloring ?
Yes. Each number refers to an entry in the conchars table, starting horizontally from left to right, and them from top to bottom.
-

Cobalt - Posts: 445
- Joined: Wed Jun 10, 2009 2:58 am
- Location: New England, USA
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest