[Ajuda] Flood
#2

Esse anti flood quando o player escreve mto rapido ele fica calado e nгo pode escrever no chat por 1 min

pawn Код:
//======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;
}
Creditos : [LF]PlaYer

Ajudei? Reep+
Reply


Messages In This Thread
[Ajuda] Flood - by Senhor_Azul - 23.04.2012, 15:10
Re: [Ajuda] Flood - by Caio_Freeze - 23.04.2012, 15:15
Re: [Ajuda] Flood - by dPlaYer_ - 23.04.2012, 16:06
Re: [Ajuda] Flood - by Caio_Freeze - 23.04.2012, 16:23

Forum Jump:


Users browsing this thread: 1 Guest(s)