[FilterScript] Anti Flood Basico para o Chat
#3

Pra mim isso й um cуdigo ъtil. Mas cada um tem sua opiniгo

pawn Код:
#include <a_samp>

new
    gFloodStamp[MAX_PLAYERS],
    gFloodCount[MAX_PLAYERS];

public OnPlayerText(playerid, text[])
{
    if(gFloodStamp[playerid] > 0)
    {
        if(gettime() >= gFloodStamp[playerid])
        {
            gFloodStamp[playerid] = 0;
            gFloodCount[playerid] = 0;
        }
        else
        {
            gFloodCount[playerid]++;
            if(gFloodCount[playerid] == 3)
            {
                return Kick(playerid), 0;
            }
        }
    }
    gFloodStamp[playerid] = gettime() + 3; // 3 segundos pra falar
    return 1;
}
Reply


Messages In This Thread
Anti Flood Basico para o Chat - by cJMaster_ - 27.06.2012, 15:37
Re: Anti Flood Basico para o Chat - by Kuddy - 27.06.2012, 15:38
Re: Anti Flood Basico para o Chat - by Jason` - 27.06.2012, 15:45
Re: Anti Flood Basico para o Chat - by gcoder - 27.06.2012, 15:45
Re: Anti Flood Basico para o Chat - by cJMaster_ - 27.06.2012, 15:49
Re: Anti Flood Basico para o Chat - by Edu33 - 27.06.2012, 15:58
Re: Anti Flood Basico para o Chat - by paulor - 27.06.2012, 16:37
Re: Anti Flood Basico para o Chat - by cJMaster_ - 27.06.2012, 16:49
Re: Anti Flood Basico para o Chat - by Edu33 - 27.06.2012, 17:08
Re: Anti Flood Basico para o Chat - by .FuneraL. - 27.06.2012, 17:11

Forum Jump:


Users browsing this thread: 1 Guest(s)