Colors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Colors (
/showthread.php?tid=585046)
Colors -
SumX - 10.08.2015
Hello! I made the mistake to write the code to all my "SendClientMessage" with color -1 (white).
I have different params, for example, playerid, targetid, killerid, +++ more, etc, how can I change that -1 to another color without having to go through all the code I wrote and manually modify the -1 with the new color I want?
Thank you!
Re: Colors -
Vince - 10.08.2015
It's called
search and replace and every text editor has it.
Re: Colors -
SumX - 10.08.2015
Yea smartass, search that -1 and replace it even in the colors of the 500 vehicles I have or in the x,y,z of the billion objects I have? No thx.
Re: Colors -
Vince - 10.08.2015
Sigh. Of course I know that. Do you think I'm an idiot? You must use it creatively. Something like:
Search:
, -1, "
Replace:
, COLOR_RED, "
Of course, if you wanted to do it really well you'd use a regular expression.
Search:
SendClientMessage\((.+), -1,
Replace:
SendClientMessage\($1, COLOR_RED,
Re: Colors -
SumX - 10.08.2015
Thanks! now really thanks!!!