[Pedido] Anti-Flood
#2

Код:
new IsFlooding[MAX_PLAYERS];
new Flooder[MAX_PLAYERS];
Код:
public OnPlayerText(playerid, text[])
{
    if(Flooder[playerid] == 1)
    {
        SendClientMessage(playerid, -1, "{FF0000}[ERRO]{FFFFFF} Vocк estб calado e nгo pode usar o chat !");
        return 0;
    }
    IsFlooding[playerid]++;
    if(IsFlooding[playerid] >= 3)
    {
        IsFlooding[playerid] = 0;
        Flooder[playerid] = 1;
        SendClientMessage(playerid, -1, "{FF0000}[INFO]{FFFFFF} Vocк foi calado por 1 minuto. Motivo: Flood !");
        SetTimerEx("LiberaraChat", 60000, false, "i", playerid);
        return 0;
    }
    else
    {
        SetTimerEx("SemFlood", 2000, false, "i", playerid);
    }
    return 1;
}


forward SemFlood(playerid);
public SemFlood(playerid)
{
    IsFlooding[playerid] = 0;
    return 1;
}


forward LiberarChat(playerid);
public LiberarChat(playerid)
{
    Flooder[playerid] = 0;
    SendClientMessage(playerid, -1, "Vocк foi descalado, nгo faзa mais flood !");
    return 1;
}
OBS: Nгo foi eu que fiz isso, quem for o Dono й sу flar ais
Reply


Messages In This Thread
Anti-Flood - by PSYRocK - 26.10.2012, 02:15
Re: Anti-Flood - by matheuspain - 26.10.2012, 02:25
Re: Anti-Flood - by PSYRocK - 26.10.2012, 02:30
Re: Anti-Flood - by matheuspain - 26.10.2012, 02:37
Re: Anti-Flood - by zSuYaNw - 26.10.2012, 02:42
Re: Anti-Flood - by PSYRocK - 26.10.2012, 02:54
Re: Anti-Flood - by PSYRocK - 26.10.2012, 02:56

Forum Jump:


Users browsing this thread: 1 Guest(s)