SA-MP Forums Archive
[Pedido]Anti flood/repetir palavras -' - 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]Anti flood/repetir palavras -' (/showthread.php?tid=337090)



[Pedido]Anti flood/repetir palavras -' - Edu33 - 24.04.2012

Po gente eu jб procurei um anti flood desse tipo, porque no meu servidor tem um anti flood que jб vem no Script Ladmin, e ele й meio chato, acusa tudo flood, tudo flood, tudo flood, e isso irrita.
Eu vi em uns servidores um tipo de anti flood que o cara nгo pode repetir a palavra, tipo assim:
Edu: OI
Edu: OI
(dai ele nгo deixa isso acontecer)
Nгo adianta dizer que tem no Search (sem bugs) que nгo tem eu jб procurei ¬¬


Re: [Pedido]Anti flood/repetir palavras -' - dPlaYer_ - 24.04.2012

View my signature.

-
Olhe minha assinatura '-'



@
https://sampforum.blast.hk/showthread.php?tid=301181


Re: [Pedido]Anti flood/repetir palavras -' - Edu33 - 24.04.2012

Jб vi esse nгo funfa quanto a repetir ultima frase. Esse ae й igual o que eu to usando agora :/


Re: [Pedido]Anti flood/repetir palavras -' - DartakousLien - 24.04.2012

faz de forma por exemplo, sempre que ele escrever um texto fica guardado em uma variavel e depois quando ele digitar o texto denovo verifica se й igual tipo
pawn Код:
public OnPlayerText(playerid,text[])
{
    new string[128];
    GetPVarString(playerid, "texto_digitado", string, 128);
    if(!strcmp(string,text,true,128)) return SendClientMessage(playerid,0xFFFFFF,"Voce esta cometendo flood!");
    SetPVarString(playerid,"texto_digitado",text);
}



Re: [Pedido]Anti flood/repetir palavras -' - RoacH` - 24.04.2012

pawn Код:
//onplayertext
new pvar [ 128 ] ;
GetPVarString ( playerid , "UltimoTexto" , pvar , sizeof ( pvar ) ) ;
if ( strlen ( pvar ) && !strcmp ( pvar , text ) ) {
    SendClientMessage ( playerid , -1 , "Pare de repetir no chat!" ) ;
    return 0;
}
SetPVarString ( playerid , "UltimoTexto" , text ) ;



Re: [Pedido]Anti flood/repetir palavras -' - dPlaYer_ - 24.04.2012

Olha agora '-'


Re: [Pedido]Anti flood/repetir palavras -' - DartakousLien - 24.04.2012

esse forum ta louco! ainda faz double post ...


Re: [Pedido]Anti flood/repetir palavras -' - Edu33 - 24.04.2012

Quote:
Originally Posted by RoacH`
Посмотреть сообщение
pawn Код:
//onplayertext
new pvar [ 128 ] ;
GetPVarString ( playerid , "UltimoTexto" , pvar , sizeof ( pvar ) ) ;
if ( strlen ( pvar ) && !strcmp ( pvar , text ) ) {
    SendClientMessage ( playerid , -1 , "Pare de repetir no chat!" ) ;
    return 0;
}
SetPVarString ( playerid , "UltimoTexto" , text ) ;
Nossa, esse deu certo, mas tipo, como que eu faзo pra depois de 3 avisos de
''Pare de repetir no chat''
Kickar o player?


Re: [Pedido]Anti flood/repetir palavras -' - RoacH` - 24.04.2012

pawn Код:
#include < a_samp >

new rFlood [ MAX_PLAYERS ] ;

public OnPlayerText ( playerid , text [ ] )
{
    //onplayertext
    new pvar [ 128 ] ;
    GetPVarString ( playerid , "UltimoTexto" , pvar , sizeof ( pvar ) ) ;
    if ( strlen ( pvar ) && !strcmp ( pvar , text ) ) {
        SendClientMessage ( playerid , -1 , "Pare de repetir no chat!" ) , rFlood [ playerid ] ++ ;
        return 0 ;
    }
    SetPVarString ( playerid , "UltimoTexto" , text ) ;
    if ( rFlood [ playerid ] == 3 ) return rFlood [ playerid ] = 0 , Kick ( playerid ) ;
    return 0 ;
}



Re: [Pedido]Anti flood/repetir palavras -' - Edu33 - 24.04.2012

Quote:
Originally Posted by RoacH`
Посмотреть сообщение
pawn Код:
#include < a_samp >

new rFlood [ MAX_PLAYERS ] ;

public OnPlayerText ( playerid , text [ ] )
{
    //onplayertext
    new pvar [ 128 ] ;
    GetPVarString ( playerid , "UltimoTexto" , pvar , sizeof ( pvar ) ) ;
    if ( strlen ( pvar ) && !strcmp ( pvar , text ) ) {
        SendClientMessage ( playerid , -1 , "Pare de repetir no chat!" ) , rFlood [ playerid ] ++ ;
        return 0 ;
    }
    SetPVarString ( playerid , "UltimoTexto" , text ) ;
    if ( rFlood [ playerid ] == 3 ) return rFlood [ playerid ] = 0 , Kick ( playerid ) ;
    return 0 ;
}

CONTINUO SEM KICKAR