[AJUDA] Anti-Palavrгo simples
#1

Pessoal й o seguinte, eu tenho um simples sistema de Anti-Palavrгo, dai eu queria transformar-lo em, se o player insistir em falar palavrгo 3 vezes, o player ser kickado na 3є vez, estilo o sistema de avisar ''* Nгo fale palavrхes no chat [1/3]'' se alguem puder me ajudar

pawn Код:
if(strfind(text, "porra", true) != -1 || strfind(text, "cu", true) != -1 || strfind(text, "fuder", true) != -1 || strfind(text, "buceta", true) != -1 || strfind(text, "caralho", true) != -1 || strfind(text, "puta", true) != -1){
SendClientMessage(playerid, Vermelho, "* Nгo fale palavrхes no chat pъblico!");
Reply
#2

PHP код:
new Aviso[MAX_PLAYERS];

if(
strfind(text"porra"true) != -|| strfind(text"cu"true) != -|| strfind(text"fuder"true) != -|| strfind(text"buceta"true) != -|| strfind(text"caralho"true) != -|| strfind(text"puta"true) != -1)
{
    
Aviso[playerid]++;
    if(
Aviso[playerid] >= 3Kick(playerid);
    
SendClientMessage(playeridVermelho"* Nгo fale palavrхes no chat pъblico!");

Reply
#3

Quote:
Originally Posted by Shadoww5
Посмотреть сообщение
PHP код:
new Aviso[MAX_PLAYERS];
if(
strfind(text"porra"true) != -|| strfind(text"cu"true) != -|| strfind(text"fuder"true) != -|| strfind(text"buceta"true) != -|| strfind(text"caralho"true) != -|| strfind(text"puta"true) != -1)
{
    
Aviso[playerid]++;
    if(
Aviso[playerid] >= 3Kick(playerid);
    
SendClientMessage(playeridVermelho"* Nгo fale palavrхes no chat pъblico!");

5 erros:

pawn Код:
C:\Users\Allan\Desktop\BVV.pwn(1876) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\Allan\Desktop\BVV.pwn(1880) : error 029: invalid expression, assumed zero
C:\Users\Allan\Desktop\BVV.pwn(1880) : error 029: invalid expression, assumed zero
C:\Users\Allan\Desktop\BVV.pwn(1880) : warning 215: expression has no effect
C:\Users\Allan\Desktop\BVV.pwn(1880) : error 001: expected token: ";", but found "]"
C:\Users\Allan\Desktop\BVV.pwn(1880) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Linhas:

pawn Код:
Aviso[playerid]++; // linha 1880
new Aviso[MAX_PLAYERS]; // linha 1876
Se puder me ajudar
Reply
#4

PHP код:
new Palavroes[][128] = {
    
"porra","cu","buceta","fuder","caralho","puta"
};
new 
Avisos[MAX_PLAYERS];
public 
OnPlayerText(playerid,text[])
{
    for(new 
isizeof(Palavroes); != ji++)
    {
        if(
strfind(text,Palavroes[i],true) != -1)
        {
            
Avisos[playerid]++;
            new 
sStr[60];
            
format(sStr,sizeof(sStr),"Nгo fale palavrхes no chat [%i/3]",Avisos[playerid]);
            
SendClientMessage(playerid,-1,sStr);
            if(
Avisos[playerid] == 3Kick(playerid), Avisos[playerid] = 0;
            return 
false;
        }
    }
    return 
true;

Reply
#5

Isto deve ser colocado no topo do GM:

PHP код:
new Aviso[MAX_PLAYERS]; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)