Raised This Month: $51 Target: $400
 12% 

New method of detecting aimbot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-07-2016 , 11:32   New method of detecting aimbot
Reply With Quote #1

So i decided to make a new method which will detect aimbot and i need some help and suggetions.

I thought a little bit how aimbot works and I suppose when you use aimbot then trajectory from aim to target is straight while not using cheats the trajectory is curb because player moves aim with mouse.

Explanations with Images:

Player Not Using Aimbot


Player Using Aimbot:


But the problem is that in most cases aim goes diagonal to targets because enemy can't be at the same coordinate X or Y with aim.

So it's likely it should have a function that calculates if aim goes straight diagonal to target by checking if origin changes constantly i think. Let me know what you think about it.

Last edited by siriusmd99; 07-07-2016 at 11:35.
siriusmd99 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-08-2016 , 04:04   Re: New method of detecting aimbot
Reply With Quote #2

I believe aimbot cheats don't "move" your crosshair (gradually adjust view angles), but rather "set" it. Angles aren't even checked on the server I believe, you can send the server whatever angles you want and it will accept them, unlike origin.
klippy is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-08-2016 , 06:53   Re: New method of detecting aimbot
Reply With Quote #3

But what if i check - button IN_ATTACK , last button !IN_ATTACK and !get_user_aiming in cmd start and then start to count frames?
Then check frames number in take_damage?

And check what is the maximum frame number aimbot shoot took before reaching the target?

Because if player shoots he has much more frames after reaching enemy while aimbot so more faster because it sets aim directly to enemy.

I tried to hook status value to detect when player is aiming at other player and then calculate how many frames there are between aim and shoot.
But there is something weird, i aim on a frozen bot (he doesnt move) then wait 1 second and shoot and it shows only 60-80 frames while i have 99 FPS. Also if i aim and shoot fast (no aimbot , just me) it shows 6-7 frames but its not possible. You can't do even you have very good reaction.
So whats the cause it shows random values? Maybe i should use get_user_aiming on prethink instead of getting it with status value hook?
Or Maybe its because I used podbots for testing?

Look also at the code: (dont pay attention to // comments, only to used code)

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

#define PLUGIN "Detect Aimbot TEst plugin"
#define VERSION "1.0"
#define AUTHOR "siriusmd99"

//#define MAX_DISTANCE 1000
//#define FRAMES_BEFORE_SHOOT 100 

/*new g_target[33] 
new g_frames[33]*/ 
new g_aimed_frames[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_PlayerPreThink"fwdPlayerPreThink"0)
    
//register_event("Damage", "hook_Damage", "b", "2!0", "3=0", "4!0")
    
RegisterHam Ham_TakeDamage"player""hook_TakeDamage")
    
register_event"StatusValue" "eventStatusValue" "be" "1=2" );
    
register_logevent("hook_Round_Start",2"1=Round_Start")
}

public 
hook_Round_Start()
{
    for(new 
iget_maxplayers(); i++)
        if(
is_user_connected(i) && is_user_bot(i))
    {
        
strip_user_weapons(i)
        
set_pev(ipev_velocity, { 0.0 0.0 0.0 } )
        
set_pev(ipev_flagspev(ipev_flags) | FL_FROZEN
    }
    
    
    
}

/*public fwdPlayerPreThink(id)
{
if(g_frames[id] > FRAMES_BEFORE_SHOOT)    
{
    static target, body;
    if(!get_user_aiming(id, target, body, MAX_DISTANCE))
        g_frames[id] = 0;
        }else{
        g_frames[id]++;
    }
}*/

public fwdPlayerPreThink(id)
{
    if(
g_aimed_frames[id])
    {
        
g_aimed_frames[id]++;
        
        
        
/*}else{
        static target, body;
        target = 0;
        get_user_aiming(id, target, body)
        if(target) // tried also if(get_user_aiming(id, target, body)) and also if(get_user_aiming(id, target, body) > 0.0) and doesnt work.
            g_aimed_frames[id] = 1;*/
    
}
}    

public 
eventStatusValueid )
{
    
g_aimed_frames[id] = 1;  
}      

//public hook_Damage(victim) //switched to ham because i thought this doesnt work

public hook_TakeDamage victimweaponidFloat:damagedamagebits )
{
    
    new 
frames g_aimed_frames[id];
    if(
frames)
    {
        
client_print(idprint_chat"[AMXX] %d Frames before shoot."frames)
        
g_aimed_frames[id] = 0;
    }
    


Last edited by siriusmd99; 07-08-2016 at 06:54.
siriusmd99 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 07-08-2016 , 08:08   Re: New method of detecting aimbot
Reply With Quote #4

cl_cmdrate is what dictates how many times per second will "client" code get executed on the server, not your FPS. Your FPS is primarly used for rendering, cl_cmdrate tells at which rate you send updates to the server, and cl_updaterate at what rate you receive them.

Last edited by klippy; 07-08-2016 at 08:08.
klippy is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 07-08-2016 , 11:49   Re: New method of detecting aimbot
Reply With Quote #5

Depends for what mode you want to do it

On normal you could just count for example where 200 bullets of the player's hit
if 90% percent are headshots, then he is probably using aimbot

It's very unlikely for a player to do 180 shots all in the head from 200

Or you can check for his accuracy... 90% accuracy again would mean aimbot
__________________

Last edited by Depresie; 07-08-2016 at 11:51.
Depresie is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-08-2016 , 14:39   Re: New method of detecting aimbot
Reply With Quote #6

Yes but not all players configure aimbot for headshot, someone configures it to other parts of body.
But wait, you gave me an idea. I don't know exactly but i think when player shoots with aimbot then shot body parts are proportional.
I mean if you are not using aimbot then when you kill player you will get something like:
Chest - 2hits, arms 3 hits, leg -1 hit
While using aimbot will it be like :
arms - 6 hits
?? Or not?
siriusmd99 is offline
timecard
Member
Join Date: Oct 2005
Old 07-08-2016 , 15:17   Re: New method of detecting aimbot
Reply With Quote #7

Did you ever complete a working model for this? I have some other ideas in this area for detecting aimbot with relatively low false positive detection rate.
timecard is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 07-08-2016 , 16:29   Re: New method of detecting aimbot
Reply With Quote #8

Yep, at least 90% percent of the bullets shot would go to the same body part...
So that's how you can detect him

if 90 of 100 shots will be in the same body part he is probably using aimbot

The values should be changed regarding to the mod the plugin is used with
For example for Zombie Plague you should put 900 of 1000 shots because in tight places from close range players will most likely do 90 of 100 shots to the head

You could also use bugsy's idea, for example if 90% of the shots are in the same body part, spawn an invisible entity somewhere in front of the player at + 100 units or something on the Z vector, if he hits the entity, automatically ban him
__________________

Last edited by Depresie; 07-08-2016 at 16:34.
Depresie is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 07-08-2016 , 16:46   Re: New method of detecting aimbot
Reply With Quote #9

What about custom weapons with low or 0 recoil?
safetymoose is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 07-08-2016 , 17:46   Re: New method of detecting aimbot
Reply With Quote #10

Even with 0 recoil, you will not hit the same part of the body in 90 times of 100... except on zombie plague, but it can be fixed easily, you just increase the number of shoots at which it should check the accuracy

Here you have it just for headshots
PHP Code:
/* First, save the file !   -   Sublime AMXX Editor v1.8 */

#include <amxmodx>
#include <amxmisc>
// #include <cstrike>
// #include <engine>
#include <fakemeta>
#include <hamsandwich>
// #include <fun>
// #include <xs>
// #include <sqlx>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

#define AIMBOT_CHECK_VALUE 100
#define AIMBOT_CHECK_PERCENT 0.9 // 90%

new g_shots[33]
new 
g_head[33]


public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_TraceAttack"player""fw_TraceAttack"1)
    
    
// Add your code here...
}

public 
fw_TraceAttack_Post(victimattackerFloat:damageFloat:direction[3], tracehandledamage_type)
{

    if(
damage 0)
    {
        
g_shots[attacker]++

        if(
get_tr2(tracehandleTR_iHitgroup) == HIT_HEAD)
        {
            
g_head[attacker]++
        }

        if(
g_shots[attacker] >= AIMBOT_CHECK_VALUE)
        {
            if(
g_head[attacker] >= g_shots[attacker] * AIMBOT_CHECK_PERCENT)
            {
                
client_print(0print_chat"Attacker is using AimBot")
            }
        }
    }

__________________

Last edited by Depresie; 07-08-2016 at 18:17.
Depresie is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode