Hello today im gonna give you a simple chatcolor command that anyone can use.
// Color definitions
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_BLACK 0xFF000000
#define COLOR_RED 0xFFFF0000
#define COLOR_GREEN 0xFF00FF00
#define COLOR_BLUE 0xFF0000FF
#define COLOR_YELLOW 0xFFFFFF00
#define COLOR_ORANGE 0xFFFFA500
#define COLOR_PURPLE 0xFF800080
#define COLOR_PINK 0xFFFFC0CB
#define COLOR_CLAN 0xFF00FFFF
// Include definitions
#include <a_samp>
#include <sscanf2>
#include <zcmd>
#define COLOR_COMMAND "/color"
#define COLOR_USAGE "/color [color code] - Changes your chat color to the specified code."
// Chat color command
CMD:color(playerid, params[])
{
new color = strval(params);
if(!color || color < 0 || color > 9)
{
SendClientMessage(playerid, COLOR_RED, "Usage: %s", COLOR_USAGE);
return 1;
}
SetPlayerChatBubbleColor(playerid, color);
SendClientMessage(playerid, COLOR_GREEN, "Your chat color has been changed to %d.", color);
return 1;
}