Guys, I need the command /CC = Clean chat.
Message in the chat will be: Admin cleaned the chat but in different colors every time I use the command.
I should have only a command can be used passwords that are connected to Rcon.
pawn Код:
cmd(cc, playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return 1;
new
red = random(256),
green = random(256),
blue = random(256),
colour = 0xFFFFFFAA,
string[128];
colour = (colour & 0x00FFFFFF) | (red << 24);
colour = (colour & 0xFF00FFFF) | (green << 16);
colour = (colour & 0xFFFF00FF) | (blue << 8);
for (new i; i < 80; ++i) SendClientMessageToAll(colour, " ");
GetPlayerName(playerid, string, sizeof (string));
format(string, sizeof (string), "Admin %s cleared the chat!", string);
SendClientMessageToAll(colour, string);
return 1;
}