[ajuda]anti-flood
#1

pawn Код:
//topo
new flood               [MAX_PLAYERS];

//onplayerconect
flood[playerid] = 0;

//onplayerdisccone
flood[playerid] = 0;

//ongamemode
SetTimer("MinSpam", 2500, true);

//onplayertext
flood[playerid]++;
if(flood[playerid] >= 3)
{
     new var0[128];
     format(var0, 128, "%s[ID:%d] foi kickado por flood", pName(playerid),playerid);
     SendClientMessageToAll(0xFFFF00AA, var0);
     Kick(playerid);
     return 0;
}

public MinSpam()
{
    foreach(Player,i) {
        if(0 < flood[i]) {
            flood[i]--;
        }
    }
    return 0;
}
erro йo seguinte as vezes esse anti-flood comeзa kickar todos os jogadores como posso resolver isso ?
Reply


Messages In This Thread
[ajuda]anti-flood - by |_MeGaTroN_| - 27.02.2012, 16:21
Re: [ajuda]anti-flood - by paulor - 27.02.2012, 16:47
Re: [ajuda]anti-flood - by |_MeGaTroN_| - 27.02.2012, 17:48
Re: [ajuda]anti-flood - by Biel_Eu - 27.02.2012, 17:52
Re: [ajuda]anti-flood - by PlayeR_TheReturN - 27.02.2012, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)