[pawn]#include <a_samp>
new color[][21]=
{
   \"{FFFF00}\", \"{00FFFF}\", \"{FF3366}\", \"{FFFFAA}\",
   \"{FFFFF0}\", \"{660000}\", \"{FF66FF}\", \"{33CCFF}\",
   \"{DD2357}\", \"{7CFC00}\", \"{FFE87D}\", \"{7E60FF}\",
   \"{AFAFAF}\", \"{FF9900}\", \"{0000BB}\", \"{FF0000}\",
   \"{FF0606}\", \"{FB0000}\", \"{99FF00}\", \"{B22222}\",
   \"{FFFFF0}\", \"{778899}\", \"{CD853F}\", \"{FFFFFF}\"
};
public OnPlayerText(playerid, text[])
{
   new
      string[128],
      rand,
      name[MAX_PLAYER_NAME];
   GetPlayerName(playerid,name,sizeof(name));
   rand = random(sizeof(color));
   format(string,sizeof(string),\"[%d] %s: %s%s\",playerid,name,color[rand][0],text);
   SendClientMessageToAll(GetPlayerColor(playerid),string);
   return 0;
}[/pawn]