04.06.2010, 05:06
How can i do this?
Originally Posted by ettans
Send empty chat lines till the chat is filled.
|
if(strcmp(cmd, "/clearchat", true) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
SendClientMessage(playerid, COLOR_WHITE, "");
return 1;
}
for(new chat = 0; chat <= 100; chat++) { SendClientMessageToAll(GREEN," "); }
forward ClearChat(lines); // forward the function
public ClearChat(lines) // create it
{
for(new i = 0; i < lines; i++) // with a loop to check the lines.
{
SendClientMessageToAll(0xFFFFFFFF," "); // send the message
}
}
if(strcmp(cmd, "/cc", true) == 0)
{
if(IsPlayerAdmin(playerid)) // change it to whatever you have, else it will only work for rcon
{
ClearChat(100);
}
return 1;
}