anti-spam
#6

pawn Код:
new LastMessage[MAX_PLAYERS][128];
new SpamTimes[MAX_PLAYERS];
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(strcmp(text, LastMessage[playerid]) == 0)
    {
        SpamTimes[playerid]++;
        if(SpamTimes[playerid] >= 3)
        {
            //do your message here
        }
    }
    else
    {
        format(LastMessage[playerid], sizeof(LastMessage[]), text);
        SpamTimes[playerid] = 0;
    }
}
Reply


Messages In This Thread
anti-spam - by Razvann - 27.03.2010, 13:53
Re: anti-spam - by jamesbond007 - 27.03.2010, 13:56
Re: anti-spam - by Razvann - 27.03.2010, 14:01
Re: anti-spam - by jamesbond007 - 27.03.2010, 14:11
Re: anti-spam - by Razvann - 27.03.2010, 14:57
Re: anti-spam - by MadeMan - 27.03.2010, 15:04
Re: anti-spam - by Razvann - 27.03.2010, 15:18
Re: anti-spam - by Anwix - 27.03.2010, 15:22
Re: anti-spam - by MadeMan - 27.03.2010, 15:31
Re: anti-spam - by ruckfules99 - 27.03.2010, 15:45

Forum Jump:


Users browsing this thread: 1 Guest(s)