Colors
#1

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!
Reply
#2

It's called search and replace and every text editor has it.
Reply
#3

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.
Reply
#4

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,
Reply
#5

Thanks! now really thanks!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)