[INC] Colors (1.0.5)
1 Attachment(s)
Colors Functions for easy chat color management About: This include file allows developers to easy control chat coloring in different mods, use color tags, use tags in the translations and automatically replace colors in mods that don't support them (any color that isn't supported will be replaced with green color). Functions:
Regular functions: PHP Code:
Regular colors: default, green (yellow in L4D), olive. Team colors: lightgreen, red, blue. Colors table: [IMG]http://img219.**************/img219/2408/colorstable3.png[/IMG] Notes:
Team color based functions: PHP Code:
Regular colors: default, green (yellow in L4D), olive. Team colors: based on author's team color. Notes:
Other: PHP Code:
|
Re: [INC] Colors
FAQ 1. How can I use color tags? Just place color tag in the text where you want your color to start from. PHP Code:
2. Is it possible to use red, blue or lightgreen colors in one string? No. You can only have one team color in a string. 3. How do formatting rules work for these functions? They work in exactly same way as for default SM functions (like PrintToChat). PHP Code:
4. Can I use color tags inside of translations files? Yes, you can. Translation file: Code:
"Phrases" PHP Code:
Output for russian clients: [IMG]http://img14.**************/img14/9972/dedust20011e.jpg[/IMG] 5. How to install it? Put colors.inc into sourcemod/scripting/include folder. Add this into the code: PHP Code:
6. Is it possible to use grey color? Yes, it is. But there is no grey tag because it requires at least one player in spectators team. This situation happens not often. But you can use grey in team color based functions. PHP Code:
Output when author is Red/T/Infected/Rebel: [IMG]http://img694.**************/img694/5869/dedust20012.jpg[/IMG] Output when author is Blue/CT/Survivor/Combine: [IMG]http://img145.**************/img145/5875/dedust20014.jpg[/IMG] 7. Why red/blue colors sometimes show as green? There must be at least one player in each team for proper red and blue colors working. Otherwise these tags will be replaced with green. 8. What does CSkipNextClient function do? It tells to CPrintToChatAll and CPrintToChatAllEx to skip client when printing message to all clients. Should be always called right in front of those functions if you want to skip someone. For example, you want to print message to all clients when client attacked someone and you don't want attacker and victim to see this message. Then you can use this code: PHP Code:
|
Re: [INC] Colors
Ty :D
|
Re: [INC] Colors
Pretty neat
|
Re: [INC] Colors
TF2 supports gray chat, its the team color when you are in spectator. I dont know if you can get it to work for this though.
|
Re: [INC] Colors
Quote:
PHP Code:
|
Re: [INC] Colors
You know, you should be able to "fake" a client on that team so you can use those colors regardless.
If only it were that simple |
Re: [INC] Colors
Quote:
|
Re: [INC] Colors
Nice work!
|
Re: [INC] Colors (1.0.1)
Update: 1.0.1
|
All times are GMT -4. The time now is 17:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.