Easy way to clear all chat?
#1

Hello,

Im trying to make a clearallchat,
And is there a easier way to clear the whole chat rather than using loads of sendclientmessage?
Reply
#2

Hm, I'm not sure this will work, I just decided to make this when I viewed this topic.


pawn Код:
#define MAX_CLEARED_MESSAGES 30
pawn Код:
stock ClearPlayerChat(playerid) {
   for(new c = 0; c < MAX_CLEARED_MESSAGES; c++) {
   SendClientMessage(playerid, 0x000000, " ");
   }
}
Reply
#3

Do a Command With Function CLEATCHATBOX(playerid, lines) (i think thats the format, im not sure).. Thats All
Reply
#4

Ok, I Looked.. Here You Have

Код:
	if(strcmp(cmd, "/CleanAll",true) == 0 && PlayerInfo[playerid][pAdmin] >= 1337)
	{
		if(IsPlayerConnected(playerid))
		{
		  for(new i = 0; i <= 17; i++) // should work
		  {
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "Server: Chat Cleaned, By: %s.", sendername);
			BroadCast(COLOR_GREEN,string);
		}
		return 1;
	}
Reply
#5

Quote:
Originally Posted by SpanishMan
Ok, I Looked.. Here You Have

Код:
	if(strcmp(cmd, "/CleanAll",true) == 0 && PlayerInfo[playerid][pAdmin] >= 1337)
	{
		if(IsPlayerConnected(playerid))
		{
		  for(new i = 0; i <= 17; i++) // should work
		  {
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
      SendClientMessageToAll(COLOR_WHITE, "\n");
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			format(string, sizeof(string), "Server: Chat Cleaned, By: %s.", sendername);
			BroadCast(COLOR_GREEN,string);
		}
		return 1;
	}
Lol, do you have any idea what you're doing or reading? Most likely he's not using a GF clearchat command like that, make your own code. If he just put that in he would get plenty of errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)