PDA

View Full Version : [HELP] CMD:CC


ThomasEvil
28/03/2017, 12:42 AM
Everywhere iam looking for CMD clearchart i found only this

CMD:cc( playerid, params[ ] )
{
for(new i = 0; i < 100; i++) SendClientMessageToAll(0, " ");
return 1;
}

The problem is that it work only for 1 line.
So when i use /cc its same like if i type 1 blank message...
Not 100.

Any idea?

ISmokezU
28/03/2017, 12:46 AM
Really? Weird because i've the same thing.

Try:
for(new i = 0; i < 100; ++i) SendClientMessageToAll(-1, "");

ThomasEvil
28/03/2017, 12:51 AM
Try:
for(new i = 0; i < 100; ++i) SendClientMessageToAll(-1, "");


I just copied this and i have still the same problem..


The wierd thing is that when i use:


CMD:cc( playerid, params[ ] )
{
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
SendClientMessageToAll(-1, " ");
// ... more (100)
return 1;
}


i still have the same problem.
What is it?

Toroi
28/03/2017, 01:41 AM
Perhaps your server has an anti-flood function?

ThomasEvil
28/03/2017, 02:30 AM
Not really,
i watched for it to be sure but i know i did not make any anti-flood and i write my mode from 0.

Primes007
28/03/2017, 04:21 AM
Rep me if i helped you!

You much define the ClearChat function for doing that.

ThomasEvil
28/03/2017, 10:03 PM
Didn't help me at all :/ Why the normal code i posted doesn't work?

ThomasEvil
29/03/2017, 07:03 AM
Anyone?
Why this is not working ?

for(new i = 0; i < 100; ++i) SendClientMessageToAll(-1, "");

Dayrion
29/03/2017, 01:57 PM
for(new i; i < 25; i++)
SendClientMessageToAll(-1, "");
instead of for(new i = 0; i < 100; ++i) SendClientMessageToAll(-1, "");
doens't work too?

AidanRO
29/03/2017, 03:06 PM
CMD:clearchat( playerid, params[ ] ){
for( new i = 0; i < 20; i++ ){ // 20 because that's the maximum amount of chat-lines and sending more messages than intended would be useless
SendClientMessageToAll( -1, "" ) ;
}
return 1 ;
}

RGOWNER
29/03/2017, 03:37 PM
CMD:cc(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
for (new c = 0; c < 100; c++) SendClientMessageToAll(0, "");
SendClientMessageToAll(0x0000BBAA, "~ An admin has cleared the server chat.");
return 1;
}