Antiflood
#1

Someone know a good antiflood?

Example:

I write for 3 times and the 4th times i will get muted.

Thanks
Reply
#2

Theres some good tutorials, let me dig in my old scripts. I'll edit with one.

This should work fine.

pawn Код:
SetPVarInt(playerid,"textspam",GetPVarInt(playerid,"textspam")+1);
    SetTimerEx("clearspam",5000,false,"d",playerid);
    if(GetPVarInt(playerid,"textspam") == 5)
    {
        AccountInfo[playerid][Mute] = 1;
        SendClientMessage(playerid, RED, "You have been muted for spamming!");
    }
    else if(GetPVarInt(playerid,"textspam") == 4)
    {
        SendClientMessage(playerid,0xAA3333AA,"stop spamming or you will be muted! (wait 5 seconds)");
        return 0;
    }
Reply
#3

Where i need to put that code?OnPlayerUpdate?
Reply
#4

OnPlayerText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)