AMXX-BG.INFO chatcolor.inc Raw include

chatcolor.inc

Original include source with line numbers.

Back Download .inc
1 #if defined _chatcolor_included
2 #endinput
3 #endif
4 #define _chatcolor_included
5
6 #pragma reqlib chatcolor
7
8 /* ColorChat Support */
9 /* Replace in .sma line #include <colorchat> with #include <chatcolor> */
10 // #define NORMAL 0 // use client_print or start sentence with ^1 and set sender to same value as index
11 // #define GREEN 0 // start sentence with ^4
12 // #define TEAM_COLOR 0 // determine who is sender and set ti that id, or choose a color
13 #define RED Red
14 #define BLUE Blue
15 #define GREY Grey
16 #define ColorChat client_print_color
17 /* ColorChat Support */
18
19 enum
20 {
21 Grey = 33,
22 Red,
23 Blue
24 }
25
26 /**
27 * Sends coloured message to player. Set index to 0 to send text globaly..
28 * An example would be: client_print_color(id, Red, "^4This is green ^3this is red, ^1this is your default chat text color");
29 * Look at the above enum for second parameter lists when you don't pass a player index in it.
30 *
31 * @param index This is the player index (1 to maxplayer) you want to send the message, use 0 to send to all players.
32 * @param sender This is the player index you want to use the team color, see above enum if you want to force a color.
33 * @param fmt Format string in which patterns gonna be replaced with argument list.
34 *
35 * @return Returns 1 if the message has been sent, 0 if the index specified is a not connected player, or if a global message has not been sent because there are no humans players.
36 */
37 native client_print_color(index, sender, const fmt[], any:...);
38
39 /**
40 * Coloured register_dictionary version
41 *
42 * @param filename Dictionary file to register.
43 * The file should be in "addons/amxx/data/lang/"
44 * only the name needs to be given.
45 * (e.g. register_dictionary("file.txt") will be addons/amxx/data/file.txt).
46 *
47 * @return Returns 1 on success, 0 if register_dictionary has returned 0 or if file can't be opened.
48 */
49 native register_dictionary_colored(const filename[]);
50