SA-MP Forums Archive
Autoban Bot - help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Autoban Bot - help (/showthread.php?tid=321515)



Autoban Bot - help - Kudoz - 27.02.2012

Okay, so I got this little script by a guy named Universal. *He commented*
Anywayz, I need help. I et 2 errors when compiling this into my GM.

pawn Код:
public OnPlayerConnect(playerid)
}
    if(IsPlayerNPC(playerid))
    {
          Ban(playerid);
    SendClientMessage(playerid, 0xFFFF00AA, "Banned by [BOT]Security Guard! [REASON: Bot Attack]
    return 1;
}
Here are the errors:
Код:
 C:\Users\Siv malene\Desktop\RDCgamemode.pwn(282) : error 010: invalid function or declaration
C:\Users\Siv malene\Desktop\RDCgamemode.pwn(286) : error 010: invalid function or declaration
the line-error number 287 :i the last } after return 1;

and the line-error number 282 is : if(IsPlayerNPC(playerid))


Re: Autoban Bot - help - Madd Kat - 27.02.2012

The first bracket in the function is backwards

And your missing a closing bracket in the if statement


Re: Autoban Bot - help - CyNiC - 27.02.2012

Change for:
pawn Код:
public OnPlayerConnect(playerid)
}
    if(IsPlayerNPC(playerid))
    {
          Ban(playerid);
          SendClientMessage(playerid, 0xFFFF00AA, "Banned by [BOT]Security Guard! [REASON: Bot Attack]");
    }
    return 1;
}



Re: Autoban Bot - help - Madd Kat - 27.02.2012

Top bracket is still wrong.


Re: Autoban Bot - help - sampreader - 27.02.2012

Quote:
Originally Posted by CyNiC
Посмотреть сообщение
Change for:
pawn Код:
public OnPlayerConnect(playerid)
}
    if(IsPlayerNPC(playerid))
    {
          Ban(playerid);
          SendClientMessage(playerid, 0xFFFF00AA, "Banned by [BOT]Security Guard! [REASON: Bot Attack]");
    }
    return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{



Re: Autoban Bot - help - Twisted_Insane - 27.02.2012

pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid))    {
          Ban(playerid);  
          SendClientMessage(playerid, 0xFFFF00AA, "Banned by [BOT]Security Guard! [REASON: Bot Attack]");
    }
    return 1;
}
Hope I helped ya!


Re: Autoban Bot - help - Konstantinos - 27.02.2012

[Include] FloodControl.inc ─ Easily block flood bots
This is to prevent bot attack.


Re: Autoban Bot - help - Kudoz - 18.03.2012

Thanks everyone! +rep 4 you!