23.04.2012, 15:10
Como faz um sistema que quando o jogador flodar,ele seja kickado direto ? Obrigado.
//======Include=====//
#include <a_samp>
//======New's=======//
new pFlodando[MAX_PLAYERS];
new Flood[MAX_PLAYERS];
//=====Forward's====//
forward SemFloodPorra(playerid);
forward ChatLiberado(playerid);
//=====CallBacks====//
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" FilterScript Ant-Flood ");
print("--------------------------------------\n");
return 1;
}
public OnPlayerText(playerid, text[])
{
if(Flood[playerid] == 1)
{
SendClientMessage(playerid, -1, "{FF0000}[Anti-Flood]{FFFFFF} Vocк estб MUDO e nгo pode usar o chat !");
return 0;
}
pFlodando[playerid]++;
if(pFlodando[playerid] >= 4)
{
pFlodando[playerid] = 0;
Flood[playerid] = 1;
SendClientMessage(playerid, -1, "{FF0000}[Anti-Flood]{FFFFFF} Vocк foi calado por 1 minuto. Motivo: Flood !");
SetTimerEx("ChatLiberado", 60000, false, "i", playerid);
SetTimerEx("ChatLiberado", 60000, false, "i", playerid);
return 0;
}
else
{
SetTimerEx("SemFloodPorra", 2000, false, "i", playerid);
}
return 1;
}
public SemFloodPorra(playerid)
{
pFlodando[playerid] = 0;
return 1;
}
public ChatLiberado(playerid)
{
Flood[playerid] = 0;
SendClientMessage(playerid, -1, "{FF0000}[Anti-Flood]{FF0000}Vocк foi descalado, nгo faзa mais flood !");
return 1;
}
Esse anti flood quando o player escreve mto rapido ele fica calado e nгo pode escrever no chat por 1 min
pawn Код:
|