01.03.2008, 11:16
Just use this very simple /changecolor command. 
btw make sure you have this at the top of your script 

Код:
if(strcmp(cmd, "/changecolor", true) == 0) { if(IsPlayerConnected(playerid)) { SendClientMessage(playerid, COLOR_LIGHTRED, "COLORS: /red - this makes your name color red"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "COLORS: /lightblue - this makes your name color light blue") SendClientMessage(playerid, COLOR_DBLUE, "COLORS: /darkblue - this makes your name color dark blue") SendClientMessage(playerid, COLOR_WHITE, "COLORS: /white - this makes your name color white") SendClientMessage(playerid, COLOR_YELLOW, "COLORS: /yellow - this makes your name color yellow") SendClientMessage(playerid, COLOR_GREEN, "COLORS: /green - this makes your name color green") SendClientMessage(playerid, TEAM_BALLAS_COLOR, "COLORS: /purple - this makes your name color purple") } return 1; } if(strcmp(cmd, "/red", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_LIGHTRED); SendClientMessage(playerid, COLOR_LIGHTRED, "Your name color has been successfully changed to red"); } return 1; } if(strcmp(cmd, "/lightblue", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_LIGHTBLUE); SendClientMessage(playerid, COLOR_LIGHTBLUE, "Your name color has been successfully changed to light blue"); } return 1; } if(strcmp(cmd, "/darkblue", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_DBLUE); SendClientMessage(playerid, COLOR_DBLUE, "Your name color has been successfully changed to dark blue"); } return 1; } if(strcmp(cmd, "/white", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_WHITE); SendClientMessage(playerid, COLOR_WHITE, "Your name color has been successfully changed to white"); } return 1; } if(strcmp(cmd, "/yellow", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_YELLOW); SendClientMessage(playerid, COLOR_YELLOW, "Your name color has been successfully changed to yellow"); } return 1; } if(strcmp(cmd, "/green", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, COLOR_GREEN); SendClientMessage(playerid, COLOR_GREEN, "Your name color has been successfully changed to green"); } return 1; } if(strcmp(cmd, "/purple", true) == 0) { if(IsPlayerConnected(playerid)) { SetPlayerColor(playerid, TEAM_BALLAS_COLOR); SendClientMessage(playerid, TEAM_BALLAS_COLOR, "Your name color has been successfully changed to purple"); } return 1; }

Код:
#define COLOR_GREEN 0x33AA33AA #define TEAM_BALLAS_COLOR 0xD900D3C8 #define COLOR_YELLOW 0xFFFF00AA #define COLOR_WHITE 0xFFFFFFFF #define COLOR_DBLUE 0x2641FEAA #define COLOR_LIGHTBLUE 0x33CCFFAA #define COLOR_LIGHTRED 0xFF6347AA