AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Automaticaly removing %'s from chat... (https://forums.alliedmods.net/showthread.php?t=48815)

omghax 12-20-2006 22:20

[SOLVED] Automaticaly removing %'s from chat...
 
I was wondering if there was a way to bypass this... or if the way I'm doing it is just wrong.

Everytime someone says something, or if I try to log something to a file with a % in it, it automaticaly removes it.

Is there a way to fix this?


Sorry if this has been asked already, I wasn't sure what to search for... :/


-- Thanks, :)

SweatyBanana 12-20-2006 23:41

Re: Automaticaly removing %'s from chat...
 
I think this is within HL1 itself, not amxmodx.

omghax 12-20-2006 23:45

Re: Automaticaly removing %'s from chat...
 
Actually, it logs in the file just fine... I just can't print it through chat. Sorry, I looked over that.

XxAvalanchexX 12-20-2006 23:48

Re: Automaticaly removing %'s from chat...
 
It's part of the HL1 engine, because % is the magical formatting character, it removes it from names and chat text so as not to screw anything up.

P.S. That quote is from George Carlin, not "Skull."

omghax 12-20-2006 23:50

Re: Automaticaly removing %'s from chat...
 
Then why can I say it while I'm in game, but I can't replicate it in Pawn through client_print?

P.S. Someone said it in IRC, I just copied and pasted it.

XxAvalanchexX 12-20-2006 23:52

Re: Automaticaly removing %'s from chat...
 
Try running your favorite HL1 mod and say "LOOK AT THIS PERCENT: %". Your message will be outputted as "LOOK AT THIS PERCENT: ".

EDIT: Apparently Counter-Strike is the only mod that does this. Go me!

omghax 12-20-2006 23:59

Re: Automaticaly removing %'s from chat...
 
[img]http://img172.**************/img172/8018/untitled1fb6.png[/img]

Emp` 12-21-2006 00:20

Re: Automaticaly removing %'s from chat...
 
when doing print chat and menus (and maybe other things) use %%. it will show one %

omghax 12-21-2006 00:22

Re: Automaticaly removing %'s from chat...
 
Thanks, I was thinking of someway to implement that already.

My problem is, is let's say I'm grabbing what everyone says and client_printing it back through print_chat. Now if I wouldn't of done this, it would display the %'s correctly. But once I add this function, it no longer displays the %'s and just removes them.

stupok 12-21-2006 01:18

Re: Automaticaly removing %'s from chat...
 
replace_all ( string[], len, "%", "%%" )


All times are GMT -4. The time now is 22:26.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.