Jump to content

Home

^8 & ^9


Dom_152

Recommended Posts

Posted

Q_CleanStr and SanatizeString(2) do not seem to remove the ^8 and ^9 colour codes from names for some reason. How can I either alter those functions so it will remove those colour codes or do it maunally? I don't really consider those two proper colours, they are just duplicates and I would like to get rid of them.

Posted

g_client.c

Line 1368 through to Line 1372

 

That segment disables black names...see if you can work your way around that code to disable ^8 and ^9 in names/text

 

Good luck...i'm a noob coder, so i cant really show you how..

Posted

I've tried that. All it does is skip the colour code so it's not actually used as a colour but the code is still there. I want to actually get rid of the characters so it's just a plain name with no colour codes at all.

Posted

Well I know the xMod src has a new version of cleanclientname which removes ^8 and ^9, but it has a bug in the src in the version that is avail. on sourceforge.

Posted

What i don't get is why SanatizeString/Q_CleanStr doesn't get rid of them. SanatizeString2() definatly seems to go up to 9 in the colour index so i dont see why not.

Posted

No, because they are not actually color codes. Hence why the game doesn't show them as color in text boxes or console. 0-7 are the only valid colors. I honestly see no purpose of using SanatizeString(2) as they seem to strip out the carrot of names such as ^ensiform, the only logical reason would be to use it so that non-standard ascii characters are not stripped but one could write a better function to strip colors without harming the non-ascii characters instead of using SanatizeString(2). If you are not worried about the ascii chars, then use Q_CleanStr after you've already removed 8 and 9 from the string.

Posted

On a completely unrelated topic how can I make text centre print on the screen for a certain time without editing the client side. Is that even possible?

Posted

The xMod version of that function has a bug as i mentioned. The only way to have it stay on screen longer is to spam cp commands to the clients as many times as needed. Note: the way seen in xMod 2.0 is not the greatest, but if it is modified a bit, can work nicely. If you chose to do that, just stick it in the existing ClientTimerActions instead of making a new one otherwise you will end up with some serious bugz (timer being knocked down for -2 sec each time)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...