Um anti Flood Comands. -
Mercurio - 22.07.2012
Alguйm poderia me disponibilizar algum anti flood comands por favor?
Estou com problemas em meu servidor

Grato!
Re: Um anti Flood Comands. -
Mercurio - 22.07.2012
Alguйm poderia me ajudar?
AW: Um anti Flood Comands. -
billy the kid - 22.07.2012
cara tem + ou - 1000 mil aassuntos sobre isso ae aki
http://forum.sa-mp.com/search.php
use ae se nao achar procure ate achar!
espero ter ajudado!
Re: Um anti Flood Comands. -
Arthenry - 22.07.2012
Esse kara acima nгo te ajuda em simplismente nada manin!
AW: Um anti Flood Comands. -
billy the kid - 22.07.2012
pawn Код:
Esse kara acima nгo te ajuda em simplismente nada manin!
cara a conversa nao e com vc entao fica xiu ae
EU SEI FAZE MAIS NAO VO passa pq

pq cada dia aparece um igual vc artheny se achando aki
e a pura a verdade os outros tanbem vao falaar pra ele pesquisa
agora se vc e o cara posta o codigo pra ele
Re: Um anti Flood Comands. -
Abravanel - 22.07.2012
Use o search (:
Encontrei alguns para vocк:
https://sampforum.blast.hk/showthread.php?tid=354432
https://sampforum.blast.hk/showthread.php?tid=337835
https://sampforum.blast.hk/showthread.php?tid=326602
https://sampforum.blast.hk/showthread.php?tid=324101
Re: Um anti Flood Comands. -
Mercurio - 22.07.2012
No meu caso eu queria que bloqueasse o player de utilizar o comando caso ele floodasse...
AW: Um anti Flood Comands. -
billy the kid - 22.07.2012
pawn Код:
IsSpamming(pid,temp)
{
static sz_t[MAX_PLAYERS char];
if(sz_t{pid} == 0)
{
sz_t{pid} = gettime();
return false;
}
if((gettime() - sz_t{pid}) >= temp) return true;
return sz_t{pid} = gettime();
}
Utilizando:
pawn Code:
if(IsSpamming(playerid, 3)) // 3 segundos
{
return SendClientMessage(playerid, -1,"Pare con o frodi mano!"),0;
}
taa ae usei o search por 1 minuto e achei interessante neh ?
faзa bom proveito
creditos a
[Full]Garfield[XDB]
Re: AW: Um anti Flood Comands. -
Mercurio - 22.07.2012
Quote:
Originally Posted by billy the kid
pawn Код:
IsSpamming(pid,temp) { static sz_t[MAX_PLAYERS char]; if(sz_t{pid} == 0) { sz_t{pid} = gettime(); return false; } if((gettime() - sz_t{pid}) >= temp) return true; return sz_t{pid} = gettime(); }
Utilizando:
pawn Code: if(IsSpamming(playerid, 3)) // 3 segundos { return SendClientMessage(playerid, -1,"Pare con o frodi mano!"),0; }
taa ae usei o search por 1 minuto e achei interessante neh ?
faзa bom proveito
creditos a
[Full]Garfield[XDB]
|
Failed...
AW: Um anti Flood Comands. -
billy the kid - 22.07.2012
tenta
pawn Код:
//No Topo do GM:
new Comandos[MAX_PLAYERS][20];
new FloodComandos[MAX_PLAYERS];
//No comeзo do OnPlayerCommandText:
new ComandoAtual[20];
new Parametro;
ComandoAtual = strtok(cmdtext, Parametro);
if(!strcmp(ComandoAtual, Comandos[playerid], true) && strlen(Comandos[playerid]))
{
FloodComandos[playerid]++;
SendClientMessage(playerid, 0x33CCFFAA, "Proibido flood em comandos !");
if(FloodComandos[playerid] == 3)
{
Comandos[playerid] = ("");
FloodComandos[playerid] = 0;
new STR[65];
new NickName[MAX_PLAYER_NAME];
GetPlayerName(playerid, NickName, MAX_PLAYER_NAME);
format(STR, 65, "%s Foi kickado por floodar nos comandos!", NickName);
SendClientMessageToAll(0xFF0000AA, STR);
Kick(playerid);
}
return 1;
}
else
{
FloodComandos[playerid] = 0;
}
format(Comandos[playerid], 20, "%s", ComandoAtual);
//E, se a funзгo strtok nгo estiver declarada, no Final do GM:
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
procurei e achei isso ae tenta deve funciona
creditos a Rjjj