PDA

View Full Version : Clear chat?


Fedee!
20/03/2010, 08:54 PM
Is there any func like ClearChat? Or ClearPlayerChat?

Thanks.

Las Venturas CNR
20/03/2010, 08:58 PM
It takes 10 msgs to fill up the chat, so you could use:


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.

Jeffry
20/03/2010, 08:58 PM
for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;

Hope this helped you.

Greetz,
Jeffry

Fedee!
20/03/2010, 09:02 PM
Thanks guys :)

Zimon95
20/03/2010, 09:21 PM
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:
for(new i = 0; i < 16; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;

Jeffry
20/03/2010, 09:30 PM
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:
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.).

Dark_Thunder
10/04/2011, 06:05 AM
thnx

sKill00
25/08/2011, 03:02 PM
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.

[MWR]Blood
25/08/2011, 03:13 PM
Look at the last post date -.-

IceCube!
25/08/2011, 03:14 PM
Look at the last post date -.-
Now that bump was bigger than....

Macluawn
25/08/2011, 03:27 PM
The SA:MP chatbox has only 16 lines, so it can be like this:
for(new i = 0; i < 16; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;

Players can set their own amount of lines, from 10 to 20.

Tee
25/08/2011, 03:29 PM
That's why it's best to use Jeffry's code, because they can scroll.

Players can set their own amount of lines, from 10 to 20.

If you guys don't believe Macluawn, try it for yourself - /pagesize.