25.11.2012, 09:07
Quote:
pawn Код:
|
pawn Код:
CMD:cc(playerid, params[])
{
new string[128], Name[25]; // This is the string what is lenght 128 letters, and a variable to store the name in
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xAFAFAFAA, "You are not authorized to use this command."); // This will check if you are rcon logged in
GetPlayerName(playerid, Name, sizeof(Name)); //Storing the name into the Name variable we created
for(new i=0; i<50; i++) // This will send a empty message 50 times to all players and it will clear the chat
{
SendClientMessageToAll(-1, "");
}
format(string, sizeof(string), "AdmWarning: %s has cleared the chat window.",Name); // This will show who cleared the chat (using the name variable to show the name we got earlier)
SendClientMessageToAll(0xFFFF00AA, string); // This will send the message to all players
return 1;
}