| (More) Colors
More functions for easy chat color management
 Описание (от автора):Добавляет целый букет цветов (спасибо asherkin!) для плагинов использующих чат. Полностью (почти) совместимы с оригинальными colors.inc. Вы можете использовать различные цвета команды в одном сообщении! Это для TF2. Это бета-версия и может быть изменена.
 
 Описание (от себя):
 Добавляет множество цветов, работает также в CSS, но не очень красиво в консоли в списке целых 149 цветов, наслаждайтесь.
 
 Поддержка последних версий игр:
   
 Team Fortress 2Counter-Strike: SourceHalf-Life 2: DeathmatchDay of Defeat: Source  
 Функции:
   
PHP код: /*** Prints a message to a specific client in the chat area.
 * Supports color tags.
 *
 * @param client        Client index.
 * @param message        Message (formatting rules).
 * @noreturn
 *
 * On error/Errors:        If the client is not connected an error will be thrown.
 */
 stock CPrintToChat(client, const String:message[], any:...)
 
 
 /**
 * Prints a message to all clients in the chat area.
 * Supports color tags.
 *
 * @param client        Client index.
 * @param message        Message (formatting rules).
 * @noreturn
 */
 stock CPrintToChatAll(const String:message[], any:...)
 
 
 /**
 * Prints a message to a specific client in the chat area.
 * Supports color tags and teamcolor tag.
 *
 * @param client        Client index.
 * @param author        Author index whose color will be used for teamcolor tag.
 * @param message        Message (formatting rules).
 * @noreturn
 *
 * On error/Errors:        If the client or author are not connected an error will be thrown
 */
 stock CPrintToChatEx(client, author, const String:message[], any:...)
 
 
 /**
 * Prints a message to all clients in the chat area.
 * Supports color tags and teamcolor tag.
 *
 * @param author      Author index whos color will be used for teamcolor tag.
 * @param message   Message (formatting rules).
 * @noreturn
 *
 * On error/Errors:   If the author is not connected an error will be thrown.
 */
 stock CPrintToChatAllEx(author, const String:message[], any:...)
 
 
 /**
 * This function should only be used right in front of
 * CPrintToChatAll or CPrintToChatAllEx and it tells
 * to those funcions to skip specified client when printing
 * message to all clients. After message is printed client will
 * no more be skipped.
 *
 * @param client   Client index
 * @noreturn
 */
 stock CSkipNextClient(client)
 
 
 /**
 * Adds a color to the colors trie
 *
 * @param name            Color name, without braces
 * @param color            Hexadecimal representation of the color (0xRRGGBB)
 * @return                True if color was added successfully, false if a color already exists with that name
 */
 stock bool:CAddColor(const String:name[], color)
 
 
 /**
 * Removes color tags from a message
 *
 * @param message        Message to remove tags from
 * @param maxlen        Maximum buffer length
 * @noreturn
 */
 stock CRemoveTags(String:message[], maxlen)
 
 /**
 * Replies to a command with colors
 *
 * @param client        Client to reply to
 * @param message        Message (formatting rules)
 * @noreturn
 */
 stock CReplyToCommand(client, const String:message[], any:...)
 
 /**
 * Replies to a command with colors
 *
 * @param client        Client to reply to
 * @param author        Client to use for {teamcolor}
 * @param message        Message (formatting rules)
 * @noreturn
 */
 stock CReplyToCommandEx(client, author, const String:message[], any:...)
 
 /**
 * Determines whether a color name exists
 *
 * @param color            The color name to check
 * @return                True if the color exists, false otherwise
 */
 stock bool:CColorExists(const String:color[])
 
 /**
 * Returns the hexadecimal representation of a client's team color (will NOT initialize the trie, so if you use only this function from this include file, your plugin's memory usage will not increase)
 *
 * @param client        Client to get the team color for
 * @return                Client's team color in hexadecimal, or green if unknown
 * On error/Errors:        If the client index passed is invalid or not in game.
 */
 stock CGetTeamColor(client)
   Changelog:
 v1.7.0 (2/7/13)
 
 Improved team color handing on non-SayText2 games (currently only DoD:S is supported)Added support for protobuf usermessages for if/when Source 2009 games are updated in the futurev1.6.0 (1/7/13)
 
 Changed the way {teamcolor} is handled so it relies on the game's built-in team colors instead of predefined valuesMessages will now be printed to clients' consolesv1.5.0 (12/31/12)
 
 Added CColorExistsAdded axis, allies, normal, unique, vintage, genuine, strange, strange, unusual, haunted, community, selfmade, and valve colorsv1.4.0 (10/3/12)
 
 Added CReplyToCommandAdded CReplyToCommandEx (1.4.1)v1.3.0 (9/12/12)
 
 Fixed tag mismatch warningFixed issue with CPrintToChatAllExv1.2.0 (9/9/12)
 
 Updated to use a SayText2 usermessage instead of PrintToChatv1.1.0BETA (5/28/12)
 
 Fixed bug in CPrintToChatAllExAdded StrToLower documentationAdded CRemoveTagsAdded CGetTeamColor stock, which returns the hexadecimal representation of a client's team color (without initializing the trie)v1.0.0BETA (5/11/12)
 
  Оригинал   |