CMD:clearmychat(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_LIGHTRED, " USAGE: /clearmychat [lines(0-20)]
}
CMD:clearmychat(playerid, params[]) { if(isnull(params)) return SendClientMessage(playerid, COLOR_LIGHTRED, " USAGE: /clearmychat [lines(0-20)] SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); return 1; }
CMD:hi(playerid,params[]) { SendClientMessage(playerid,0xffffffff,"Hi My Name Is Bob"); SendClientMessage(playerid,0xffffffff,"What Is Yours?"); return 1; }
CMD:clearmychat(playerid, params[]) //A player has done '/clearmychat'
{
if(!strlen(params)) return SendClientMessage(playerid, COLOR_LIGHTRED, " USAGE: /clearmychat [lines(1-20)]");
new lines = strval(params); //This is the number of lines that the player put in.
if(lines < 1 || lines > 20) return SendClientMessage(playerid, COLOR_LIGHTRED, " You must have at least 1 line, and no more than 20 lines cleared at once.");
//This basically means, if the number is less than 1, or greater than 20, send that message. This means players cannot put in negative numbers which would break your script and create an endless loop.
for(new i = 0; i < lines; i++) SendClientMessage(playerid, -1, " ");
return 1;
}
You just add
SendClientMessage(playerid,0xffffffff,""); 15 times so it becomes Код:
CMD:clearmychat(playerid, params[]) { if(isnull(params)) return SendClientMessage(playerid, COLOR_LIGHTRED, " USAGE: /clearmychat [lines(0-20)] SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); SendClientMessage(playerid,0xffffffff,""); return 1; } like: Код:
CMD:hi(playerid,params[]) { SendClientMessage(playerid,0xffffffff,"Hi My Name Is Bob"); SendClientMessage(playerid,0xffffffff,"What Is Yours?"); return 1; } |