05.06.2010, 05:18
Defines
Script
When I do it ingame (No errors on compile, it doesn't change my color, although I can't figured out why, I wanted to make a really ADVANCED /setcolor if you get me, like lots of colors
Код:
//Shades of pink #define PINK 0xFFC0CBFF #define LIGHTPINK 0xFFB6C1FF #define HOTPINK 0xFF69B4FF #define DEEPPINK 0xFF1493FF #define MEDIUMVIOLETRED 0xC71585FF #define PALEVIOLETRED 0xDB7093FF //Shades of Orange #define CORAL 0xFF7F50FF #define TOMATO 0xFF6347FF #define ORANGERED 0xFF4500FF #define DARKORANGE 0xFF8C00FF #define ORANGE 0xFFA500FF //Shades of Yellow #define GOLD 0xFFD700FF #define YELLOW 0xFFFF00FF #define LIGHTYELLOW 0xFFFFE0FF #define LEMONCHIFFON 0xFFFACDFF #define LIGHTGOLDENRODYELLOW 0xFAFAD2FF #define PAPAYAWHIP 0xFFEFD5FF #define MOCCASIN 0xFFE4B5FF #define PEACHPUFF 0xFFDAB9FF #define PALEGOLDENROD 0xEEE8AAFF #define KHAKI 0xF0E68CFF #define DARKKHAKI 0xBDB76BFF //Shades of Purple #define LAVENDER 0xE6E6FAFF #define THISTLE 0xD8BFD8FF #define PLUM 0xDDA0DDFF #define VIOLET 0xEE82EEFF #define ORCHID 0xDA70D6FF #define FUCHSIA 0xFF00FFFF #define MAGENTA 0xFF00FFFF #define MEDIUMORCHID 0xBA55D3FF #define MEDIUMPURPLE 0x9370DBFF #define AMETHYST 0x9966CCFF #define BLUEVIOLET 0x8A2BE2FF #define DARKVIOLET 0x9400D3FF #define DARKORCHID 0x9932CCFF #define DARKMAGENTA 0x8B008BFF #define PURPLE 0x800080FF #define INDIGO 0x4B0082FF #define SLATEBLUE 0x6A5ACDFF #define DARKSLATEBLUE 0x483D8BFF #define MEDIUMSLATEBLUE 0x7B68EEFF //Shades of Green #define GREENYELLOW 0xADFF2FFF #define CHARTREUSE 0x7FFF00FF #define LAWNGREEN 0x7CFC00FF #define LIME 0x00FF00FF #define LIMEGREEN 0x32CD32FF #define PALEGREEN 0x98FB98FF #define LIGHTGREEN 0x90EE90FF #define MEDIUMSPRINGGREEN 0x00FA9AFF #define SPRINGGREEN 0x00FF7FFF #define MEDIUMSEAGREEN 0x3CB371FF #define SEAGREEN 0x2E8B57FF #define FORESTGREEN 0x228B22FF #define GREEN 0x008000FF #define DARKGREEN 0x006400FF #define YELLOWGREEN 0x9ACD32FF #define OLIVEDRAB 0x6B8E23FF #define OLIVE 0x808000FF #define DARKOLIVEGREEN 0x556B2FFF #define MEDIUMAQUAMARINE 0x66CDAAFF #define DARKSEAGREEN 0x8FBC8FFF #define LIGHTSEAGREEN 0x20B2AAFF #define DARKCYAN 0x008B8BFF #define TEAL 0x008080FF //Shades of Blue/Cyan #define AQUA 0x00FFFFFF #define CYAN 0x00FFFFFF #define LIGHTCYAN 0xE0FFFFFF #define PALETURQUOISE 0xAFEEEEFF #define AQUAMARINE 0x7FFFD4FF #define TURQUOISE 0x40E0D0FF #define MEDIUMTURQUOISE 0x48D1CC #define DARKTURQUOISE 0x00CED1FF #define CADETBLUE 0x5F9EA0FF #define STEELBLUE 0x4682B4FF #define LIGHTSTEELBLUE 0xB0C4DEFF #define POWDERBLUE 0xB0E0E6FF #define LIGHTBLUE 0xADD8E6FF #define SKYBLUE 0x87CEEBFF #define LIGHTSKYBLUE 0x87CEFAFF #define DEEPSKYBLUE 0x00BFFFFF #define DODGERBLUE 0x1E90FFFF #define CORNFLOWERBLUE 0x6495EDFF #define MEDIUMSLATEBLUE 0x7B68EEFF #define ROYALBLUE 0x4169E1FF #define BLUE 0x0000FFFF #define MEDIUMBLUE 0x0000CDFF #define DARKBLUE 0x00008BFF #define NAVY 0x000080FF #define MIDNIGHTBLUE 0x191970FF //Shades of Brown #define CORNSILK 0xFFF8DCFF #define BLANCHEDALMOND 0xFFEBCDFF #define BISQUE 0xFFE4C4FF #define NAVAJOWHITE 0xFFDEADFF #define WHEAT 0xF5DEB3FF #define BURLYWOOD 0xDEB887FF #define TAN 0xD2B48CFF #define ROSYBROWN 0xBC8F8FFF #define SANDYBROWN 0xF4A460FF #define DARKGOLDENROD 0xB8860BFF #define PERU 0xCD853FFF #define SADDLEBROWN 0x8B4513FF #define SIENNA 0xA0522DFF #define BROWN 0xA52A2AFF #define MAROON 0x800000FF //Shades of Grey #define WHITE 0xFFFFFFFF #define GAINSBORO 0xDCDCDCFF #define LIGHTGREY 0xD3D3D3FF #define SILVER 0xC0C0C0FF #define DARKGRAY 0xA9A9A9FF #define GRAY 0x808080FF #define DIMGRAY 0x696969FF #define LIGHTSLATEGRAY 0x778899FF #define SLATEGRAY 0x708090FF #define DARKSLATEGRAY 0x2F4F4FFF #define BLACK 0x000000FF #define yellow 0xFFFF00AA #define green 0x33FF33AA #define red 0xFF0000AA #define white 0xFFFFFFAA #define pink 0xCCFF00FFAA #define blue 0x00FFFFAA #define grey 0xC0C0C0AA
Код:
//---------- setcolor------ if(strcmp(cmd, "/setcolor", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setcolor [playerid/PartOfName] [color]"); SendClientMessage(playerid, COLOR_GREY, "Available colors: IndianRed, Lightcoral, Salmon, DarkSalmon, Lightsalmon, Crimson, Red, Firebrick, Darkred"); SendClientMessage(playerid, COLOR_GREY, "Available colors: Pink, Lightpink, Hotpink, Deeppink, Mediumvioletred, palevioletred"); SendClientMessage(playerid, COLOR_GREY, "Available colors: Coral, Tomato, OrangeRed, Darkorange, Orange"); SendClientMessage(playerid, COLOR_GREY, "Available colors: Gold, Yellow, LightYellow, LemonChiffon, Lightgoldenrodyellow, Papayawhip, Moccasin, Peachpuff, Palegoldenrod, Khaki, Darkkhaki"); SendClientMessage(playerid, COLOR_GREY, "Available colors: Lavender, Thistle, Plum, Violet, Orchid, Fuchsta, Magenta, Mediumorchid, MediumPurple, Amethyst, Blueviolet, DarkOrchid, DarkMagenta, Purple"); SendClientMessage(playerid, COLOR_GREY, "Available colors: Greenyellow, Chartreuse, lawngreed, lime, limegreen, palegreen, lightgreen, springgreen, seagreen, forestgreen, green"); SendClientMessage(playerid, COLOR_GREY, "Available colors: Aqua, Cyan, Lightcyan, plaeturquoise, quamarine, turquoise, mediumturquoise, cadetblue, steelblue, lightsteelblue, blue"); SendClientMessage(playerid, COLOR_GREY, "Available colors: Cornsilk, Blanchedalmond, bisque, navajowhite, wheat, burlywood, tan, rosybrown, darkgoldenrod, peru, brown"); SendClientMessage(playerid, COLOR_GREY, "Available colors: White, Lightgrey, Silver, Darkgray, Gray, Dimgray, Lightslategray, darkslategray, black"); return 1; } new playa; new color; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); color = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 1337) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { SetPlayerColor(playa, color); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); } } return 1; }