View Single Post
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 01-25-2019 , 14:36   Re: Novice needing sourcepawn help
Reply With Quote #6

If you would, attach or use the code tags/php tags and give us the code you are using. That include should work with CS:S as it's in the list as supported.

However, I don't see yellow as a listing of available colors in CSS itself, but I do see it in colorvariables.inc as \x09. With that said you don't need to incorporate the include you can just add it to the replacement string, like such:
Spoiler


In the above, we've added the replacement ability for {YELLOW} which will use \x09 so that it appears in the game as yellow. You can go ahead and try that one and see if it does come out as yellow. Otherwise we would move onto what the issue you may have been facing. The issue which is that just because you added the include it may not be used, you would need to use the functions that would call those colors.

For this we remove the replacement of colors, such as {GREEN} and let the include do the hard work in replacing that. HOWEVER, you would need to change your .cfg file that has {GREEN} in it to {green} as that's how colorvariables treats those. We use the function CPrintToChat, much like PrintToChat but with the benefit of colorvariables doing the print and changing the colors for us.

Spoiler


Let me know if you have any issues compiling it, and of course if I've made any mistakes someone here would certainly love to point it out for me. Unfortunately I can't test it right now but will later and make any corrections to point you in the right direction.

Last edited by Maxximou5; 01-25-2019 at 14:39. Reason: made a mistake already
Maxximou5 is offline