Autoban Bot - help
#1

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

The first bracket in the function is backwards

And your missing a closing bracket in the if statement
Reply
#3

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

Top bracket is still wrong.
Reply
#5

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)
{
Reply
#6

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

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

Thanks everyone! +rep 4 you!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)