13.08.2012, 19:43
How to include colors in SendClientMessage.
#define WHITE "{FFFFFF}"
#define RED "{FF0000}"
SendClientMessage(playerid, 0xFFFFFF00, ""#WHITE"TEXT "#RED"TEXT");
maybe, you mean this:
PHP код:
PHP код:
|
SendClientMessage(playerid, 0xFFFFFF, ""#WHITE"TEXT "#RED"TEXT"); // second argument is hex number, not string
#define Black "{000000}" #define White "{FFFFFF}" #define Grey "{BFBFBF}" #define Red "{FF0000}" #define Orange "{FFA500}" #define Yellow "{FFFF00}" #define Green "{008000}" #define Blue "{0000FF}" #define Purple "{800080}" #define Teal "{008080}"
SendClientMessage(playerid,Yellow, "YourYellowText");
Here the defines:
Код:
#define Black "{000000}" #define White "{FFFFFF}" #define Grey "{BFBFBF}" #define Red "{FF0000}" #define Orange "{FFA500}" #define Yellow "{FFFF00}" #define Green "{008000}" #define Blue "{0000FF}" #define Purple "{800080}" #define Teal "{008080}" Код:
SendClientMessage(playerid,Yellow, "YourYellowText"); |
#define Black 0x000000FF
#define White 0xFFFFFFFF
#define Grey 0xBFBFBFFF
#define Red 0xFF0000FF
#define Orange 0xFFA500FF
#define Yellow 0xFFFF00FF
#define Green 0x008000FF
#define Blue 0x0000FFFF
#define Purple 0x800080FF
#define Teal 0x008080FF
SendClientMessage(playerid,Yellow, "YourYellowText");
#define COLOR_GREY 0xAFAFAFAA #define COLOR_GREEN 0x33AA33AA #define COLOR_RED 0xAA3333AA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BLUE 0x0000BBAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xAA3333AA #define COLOR_LIME 0x10F441AA #define COLOR_MAGENTA 0xFF00FFFF #define COLOR_NAVY 0x000080AA #define COLOR_AQUA 0xF0F8FFAA #define COLOR_CRIMSON 0xDC143CAA #define COLOR_FLBLUE 0x6495EDAA #define COLOR_BISQUE 0xFFE4C4AA #define COLOR_BLACK 0x000000AA #define COLOR_CHARTREUSE 0x7FFF00AA #define COLOR_BROWN 0XA52A2AAA #define COLOR_CORAL 0xFF7F50AA #define COLOR_GOLD 0xB8860BAA #define COLOR_GREENYELLOW 0xADFF2FAA #define COLOR_INDIGO 0x4B00B0AA #define COLOR_IVORY 0xFFFF82AA #define COLOR_LAWNGREEN 0x7CFC00AA #define COLOR_SEAGREEN 0x20B2AAAA #define COLOR_LIMEGREEN 0x32CD32AA #define COLOR_MIDNIGHTBLUE 0X191970AA #define COLOR_MAROON 0x800000AA #define COLOR_OLIVE 0x808000AA #define COLOR_ORANGERED 0xFF4500AA #define COLOR_PINK 0xFFC0CBAA #define COLOR_SEAGREEN 0x2E8B57AA #define COLOR_SPRINGGREEN 0x00FF7FAA #define COLOR_TOMATO 0xFF6347AA #define COLOR_YELLOWGREEN 0x9ACD32AA #define COLOR_MEDIUMAQUA 0x83BFBFAA #define COLOR_MEDIUMMAGENTA 0x8B008BAA
#include COLORS OnPlayerCommandText if(!strcmp("/Hi" cmdtext)) { SendClientMessage(playerid, COLOR_GREEN,"Hello player."); return 1; }