Clear Chat Information. - 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 Information. (
/showthread.php?tid=443943)
Clear Chat Information. -
Anak - 14.06.2013
Hello community,
I want to know that is there any function like ClearChat(playerid) ? Or ClearPlayerChat(playerid)?
I have this under clear chat command:
pawn Код:
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
SendClientMessageToAll(0xDEEE20FF, " ");
but they can scroll and can see messages again, i want to remove previous all messages completely.
Thanks,
Anak - Member
Re: Clear Chat Information. -
jakejohnsonusa - 14.06.2013
A better way would be to use somthing like this:
pawn Код:
for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE, " "); return 1; //For clearing all players chat.
for(new i = 0; i < 50; i++) SendClientMessage(playerid, COLOR_WHITE, " "); return 1; //For clearing a certain player's chat.
I'm not sure how many lines of message SA-MP currently holds, but you can count them and then replace the 50's with the number of lines.
Re: Clear Chat Information. -
DeMoX - 14.06.2013
Here's the full code:
Код:
for(new i = 0; i < 90; i++)
SendClientMessageToAll(-1," ");
You can add a string telling players an admin has cleared the chat ...etc
Re: Clear Chat Information. -
BigGroter - 14.06.2013
pawn Код:
CMD:clearchat(playerid, params[])
{
for(new i=0;i<150;i++)
{
SendClientMessageToAll(playerid, -1, " ");
}
return 1;
}
^If you use ZCMD.