SA-MP Forums Archive
Clear chat? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Clear chat? (/showthread.php?tid=135512)



Clear chat? - Fedee! - 20.03.2010

Is there any func like ClearChat? Or ClearPlayerChat?

Thanks.


Re: Clear chat? - Las Venturas CNR - 20.03.2010

It takes 10 msgs to fill up the chat, so you could use:

pawn Код:
SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
If it just for a certain player, use SendCleintMessage insead.


Re: Clear chat? - Jeffry - 20.03.2010

pawn Код:
for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;
Hope this helped you.

Greetz,
Jeffry


Re: Clear chat? - Fedee! - 20.03.2010

Thanks guys


Re: Clear chat? - Zimon95 - 20.03.2010

Quote:
Originally Posted by Jeffry
pawn Код:
for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;
Hope this helped you.

Greetz,
Jeffry
The SA:MP chatbox has only 16 lines, so it can be like this:
pawn Код:
for(new i = 0; i < 16; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;



Re: Clear chat? - Jeffry - 20.03.2010

Quote:
Originally Posted by Zimon95
Quote:
Originally Posted by Jeffry
pawn Код:
for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;
Hope this helped you.

Greetz,
Jeffry
The SA:MP chatbox has only 16 lines, so it can be like this:
pawn Код:
for(new i = 0; i < 16; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;
You can scroll up. With 50 you will clear the whole chat box (including scrolling up.).


Re: Clear chat? - Dark_Thunder - 10.04.2011

thnx


Re: Clear chat? - sKill00 - 25.08.2011

Hello a few days ago i had a problem with this command, I made ​​one just for players, so admins can not see:

Код:
	if(strcmp(cmd, "/clearchat", true) == 0 || strcmp(cmd, "/cc", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if (PlayerInfo[playerid][pAdmin] >= 1 )
			{
			    if(PlayerInfo[playerid][pAdmin] == 0)
				{
                                for(new i = 0; i < 100; i++)
				SendClientMessage(playerid,COLOR_WHITE," ");
                                 }
				GetPlayerName(playerid, sendername, sizeof(sendername));
                               format(string, sizeof(string), "AdmCmd:%s has cleared the chat.", sendername);
			    ABroadCast(COLOR_LIGHTRED,string,1);
     			return 1;
     			        
			}
			else
			{
				SendClientMessage(playerid, -1, "{F81414}[DENIED]:{FFFFFF} You are not authorized to use that command!");
  			}
		}
                else
                {
			SendClientMessage(playerid, COLOR_GRAD1, "   You are not Logged in !");
                }
		return 1;
	}
It's works on GF, tested.


Re: Clear chat? - [MWR]Blood - 25.08.2011

Look at the last post date -.-


Re: Clear chat? - Macluawn - 25.08.2011

Quote:
Originally Posted by Zimon95
Посмотреть сообщение
The SA:MP chatbox has only 16 lines, so it can be like this:
pawn Код:
for(new i = 0; i < 16; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;
Players can set their own amount of lines, from 10 to 20.