How to detect Bots by FilesMaker
#1

When i was fixing my scripts, i remark that BOT when it join, the server don't make his file. After I check my scripts i found that BOTS skip all dialogs, like register and login dialog.

Then I make a variable on the player info enum with name "ACCEPTED", and i put when a player type the password on the registering menu or login dialog, this accepted variable take the value 1.

Finally on OnPlayerRequestSpawn() I add a condition if that accepted variable don't take 1 the server kick the player that is supposed to BOT.

Tested with : RakSAMPClient Bot Sytem.
Please test with other Bots generator if it works +1 rep please !
Reply
#2

Credits to Konstantinos

pawn Код:
stock IsNameWithTag( const szName[ ] )
{
    if( !szName[ 0 ] ) return 0;

    new
        tag1 = strfind( szName, "[B" ), //Will detect [B
        tag2 = strfind( szName, "T]" ) //Will detect T], so [BoT] will be detected.
    ;

    return ( tag1 == 0 && tag2 != strlen( szName ) - 1 ) ? 1 : 0;
}


//OnPlayerConnect
new
    sz_Name[ MAX_PLAYER_NAME ]
    ;
    GetPlayerName( playerid, sz_Name, MAX_PLAYER_NAME );
    if( IsNameWithTag( sz_Name ) )
    {

        SetTimerEx("BanTimer", 100, false, "i", playerid);
        SendClientMessage(playerid, COLOR_RED, "[ANTI-CHEAT] - You've been AUTO-Banned for being a possible BOT user!");
    }
//rest of OnPlayerConnect script(s) here



//BanTimer
forward BanTimer(playerid);
public BanTimer(playerid)
{
    Ban(playerid);
    return 1;
}
Hackers can ofc. re-name their both.

Try getting a players IP OnPlayerConnect, and if someone connects w/ the same IP 2 or 3 times, then he's a bot sender xd
Reply
#3

That control just Name, but my remark was that bots skip all dialogs, then spawn !
It join without login or registering, that is my remark !
Reply
#4

This or My method works well with my server, test it on yours !!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)