25.11.2012, 08:36
pawn Код:
CMD:cc(playerid, params[])
{
new string[128]; // This is the string what is lenght 128 letters
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAFAFAFAA, "You are not authorized to use this command."); // This will check if you are rcon logged in
for(new i=0; i<100; i++) // This will send a empty message 100 times to all players and it will clear the chat
{
SendClientMessageToAll(0xFFFFFFAA, "");
}
format(string, sizeof(string), "AdmWarning: %s has cleared the chat window.", GetPlayerName(playerid)); // This will show who cleared the chat
SendClientMessageToAll(0xFFFF00AA, string); // This will send the message to all players
return 1;
}