06.01.2013, 06:33
Hello! I got this script:
which adds color to the name AND the text for every player. But when I log in, or anyone else, the default color or w/e is Black. How can I change this? I want it to be random! So when people log in, they will be given random tagcolor.. How is this possible? here some of my #define colors:
Код:
public OnPlayerText(playerid, text[]) { new string[128]; new name[24]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s: %s",name,text); SendClientMessageToAll(GetPlayerColor(playerid),string); return 0; }
Код:
#define COLOR_BRIGHTRED 0xE60000FF #define COLOR_VIOLET 0x9955DEEE #define COLOR_LIGHTRED 0xFF99AADD #define COLOR_SEAGREEN 0x00EEADDF #define COLOR_GRAYWHITE 0xEEEEFFC4 #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66 #define COLOR_GREENISHGOLD 0xCCFFDD56 #define COLOR_LIGHTBLUEGREEN 0x0FFDD349 #define COLOR_NEUTRALBLUE 0xABCDEF01 #define COLOR_LIGHTCYAN 0xAAFFCC33 #define COLOR_LEMON 0xDDDD2357 #define COLOR_MEDIUMBLUE 0x63AFF00A #define COLOR_NEUTRAL 0xABCDEF97 #define COLOR_BLACK 0x00000000 #define COLOR_NEUTRALGREEN 0x81CFAB00 #define COLOR_DARKGREEN 0x12900BBF #define COLOR_LIGHTGREEN 0x24FF0AB9 #define COLOR_DARKBLUE 0x300FFAAB #define COLOR_BLUEGREEN 0x46BBAA00 #define COLOR_PINK 0xFF66FFAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_DARKRED 0x660000AA #define COLOR_ORANGE 0xFF9900AA #define COLOR_GRAY 0xAFAFAFAA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_PURPLE 0x800080AA #define COLOR_LIGHTGREEN 0x24FF0AB9 #define COLOR_DARKBLUE 0x300FFAAB #define COLOR_GREY 0xAFAFAFAA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_BROWN 0x993300AA #define COLOR_CYAN 0x99FFFFAA #define COLOR_TAN 0xFFFFCCAA #define COLOR_PINK 0xFF66FFAA #define COLOR_KHAKI 0x999900AA #define COLOR_LIME 0x99FF00AA #define COLOR_TURQ 0x00A3C0AA #define COLOR_PLAYER 0xFFFFFFFF #define COLOR_ADMINRED 0xFB0000FF #define COLOR_ANNOUNCE 0x00CACAFB #define COLOR_SYSTEM 0xEFEFF7AA #define COLOR_NICESKY 0x99FFFFAA #define COLOR_NICEBLUE 0xa0d3ffAA #define COLOR_ADMINRED 0xFB0000FF #define COLOR_AFK 0x6AF7E1FF #define COLOR_SYSTEM 0xEFEFF7AA #define COLOR_PLAYERVIEW 0xC0C0C0FF #define COLOR_GRAD1 0xB4B5B7FF