Quote:
Originally Posted by McCarthy
That would not work for Rcon admin but normal players. Also I'm pretty sure 100 lines arent needed, 50 will do just fine. The GetPlayerName will also not work in the format. Correct code would be:
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; }
Also. Are you placing the commands outside callbacks?
|
Thanks a lot!. REP+ added.