Clear chat?
#1

Is there any func like ClearChat? Or ClearPlayerChat?

Thanks.
Reply
#2

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.
Reply
#3

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

Greetz,
Jeffry
Reply
#4

Thanks guys
Reply
#5

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;
Reply
#6

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.).
Reply
#7

thnx
Reply
#8

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.
Reply
#9

Look at the last post date -.-
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)