SA-MP Forums Archive
[Pedido] Sistema Anti Flood de comandos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Sistema Anti Flood de comandos (/showthread.php?tid=424207)



Sistema Anti Flood de comandos - [CGU]iSlin_Shady - 21.03.2013

  1. Bom quero um anti flood de comandos que ao invйs de kickar ou avisar eu quero que cala por 30 segundos.
  1. Ex: dei mais de 3 comandos (QUALQUER COMANDO), | ANTI FLOOD | Vocк foi bloqueado de usar comandos por 30 segundos.
  1. Espero que me ajudem, obrigado, em strcmp



Re: Sistema Anti Flood de comandos - Lуs - 21.03.2013

https://sampforum.blast.hk/showthread.php?tid=341794
https://sampforum.blast.hk/showthread.php?tid=357580
https://sampforum.blast.hk/showthread.php?tid=407679
https://sampforum.blast.hk/showthread.php?tid=324101
https://sampforum.blast.hk/showthread.php?tid=337835
https://sampforum.blast.hk/showthread.php?tid=358730
https://sampforum.blast.hk/showthread.php?tid=326602

Adivinha sу aonde eu achei isso?




Re: Sistema Anti Flood de comandos - Kuddy - 21.03.2013

Search: https://sampforum.blast.hk/showthread.php?tid=269042

Adapte.


Re: Sistema Anti Flood de comandos - [CGU]iSlin_Shady - 21.03.2013

nгo quero nenhum desses, apenas 1, mas nem funcionou

Код:
new FloodCmd[MAX_PLAYERS], FlodouCmd[MAX_PLAYERS], BloqCmd[MAX_PLAYERS], str[60]; //Coloque isto no topo

public OnPlayerText(playerid, text[]) {
    if(!IsPlayerAdmin(playerid)) {
        if(strfind(text, "/", true) != -1) {
            if((gettime() - BloqCmd[playerid]) < 30)
                return SendClientMessage(playerid, -1, "Vocк estб calado por ter floodado demais!");

            if(FlodouCmd[playerid] == 4) {
                BloqCmd[playerid] = gettime();
                SendClientMessage(playerid, -1, "Vocк flodou 5 vezes por isso ficarб calado por 30 segundos!");
                return true;
            }
            if((gettime() - FloodCmd[playerid]) < 10) {
                format(str, sizeof(str), "Aguarde %d segundos para utilizar o comando novamente!", 10 - (gettime() - FloodCmd[playerid]));
                SendClientMessage(playerid, -1, Str);
                FlodouCmd[playerid]++;
                return true;
            }
            FloodCmd[playerid] = gettime();
            FlodouCmd[playerid] = 0;
        }
    }
    return true;
}