SA-MP Forums Archive
Clearing 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: Clearing Chat (/showthread.php?tid=510130)



Clearing Chat - AnonScripter - 29.04.2014

Is there any other method to clear the chat ?

i made this one, but it make the server lags at the moment i type the command, and sometimes it crashes some players.

pawn Код:
for(new i = 0; i < 100; i ++)
{
    SendClientMessageToAll(COLOR_WHITE, "");
}



Re: Clearing Chat - Luis- - 29.04.2014

You could lower it to say, 30.


Re: Clearing Chat - AnonScripter - 29.04.2014

Quote:
Originally Posted by Luis-
Посмотреть сообщение
You could lower it to say, 30.
could you please tell me what is the number refers to ?


Re: Clearing Chat - Abagail - 29.04.2014

I don't think you need to have it all the way up to 100, either. You also could do it like this:
for(new i = 0; i < 100; i ++) SendClientMessageToAll(COLOR_GREY, " ");
Might cause a little less lag, but I don't really get any lag when using either of them. Maybe it's the host causing the issue to reside? Both of them should work fine...


Re: Clearing Chat - Luis- - 29.04.2014

Well, the 100 is how many Client messages are sent, which is a lot really. So, changing it to 30 would be more efficient imo.


Re: Clearing Chat - Pottus - 29.04.2014

There is 100 lines in the buffer.


Re: Clearing Chat - Bingo - 29.04.2014

Just make simple? In my old gamemode i used this.

pawn Код:
SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");
    SendClientMessageToAll(0xDEEE20FF, " ");



Re: Clearing Chat - AnonScripter - 29.04.2014

Thank you :)

[Edit:] Thanks all.. Useful information.


Re: Clearing Chat - Vince - 29.04.2014

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
There is 100 lines in the buffer.
50, IIRC.


Re: Clearing Chat - Galletziz - 29.04.2014

what about with this:

pawn Код:
new i = 0;
while(i != 100)
{
 SCM(...);
 i++;
}
lel