[Pedido] Sistema Anti Flood de comandos
#1

  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
Reply
#2

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?

Reply
#3

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

Adapte.
Reply
#4

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)