#define COLOR_ZERO 0xFFFFFFAA
#define verde 0x33AA33AA
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmdtext, "/LimparChat", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
SendClientMessageToAll(COLOR_ZERO, " ");
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s limpou o chat!", pname);
SendClientMessageToAll(verde, string);
}
return 1;
}
return 0;
}
pawn Код:
|
pawn Код:
|
outra pra que tanta repetiзгo de mensagem? Se usando um repetidor jб daria menos espaзo usado! |
Ahh й mesmo! Desculpem. Me esqueci que o chatkill sгo aqueles нcones do lado direito>>>>
Valeu! Nгo me importo de gastar linhas. Isso nгo me prejudicarб em nada. |
Mas usando o mбximo as funзхes que podem melhorar/optimizar o cуdigo й melhor! #FicaADica |
Detonador , quanto mais linhas , mais seu cуdigo .pwn ficarб pesado ! . E acho que tambйm influencia na demora para compilar ! |
CMD:limparchat(playerid){
ExcluirMsg(playerid,100);
return 1;
}
stock ExcluirMsg(playerid,quantia){
for(new i = 0; i <quantia; i++){
SendClientMessage(playerid,-1,"");
}
return 1;
}