SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 07/05/2015, 09:12 AM   #1
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 870
Reputation: 296
Default BustAim - Detects players using aimbot

Bust Aim
Aimbot Detection with lagcomp
Latest Version: 1.2.8.3 - 25th Jan 2017

BustAim is a feature rich anti-aimbot include which tries to detect players who are using aimbots. BustAim is designed to trigger warnings and provide administrators with vital information about the suspected player. It by itself cannot do much and requires human intelligence to confirm if the player is using an aimbot.

Features
  • Efficient
  • Lot of Configurable Options
  • Detects the teleport caused by proaim
  • Reports if a player is aiming in the wrong direction and the bullets still hit
  • Reports a player if he shoots another player who is outside the shooting weapon's maximum range
  • Provides functions to profile player shots
  • Takes care of packet loss,high ping,players surfing on vehicles,players in vehicle and much more before suspecting a player for aimbot
  • Helps identify desynced players through false warnings

How does it work?
When a player shoots, the OnPlayerWeaponShot callback is called. It is in this callback where BustAim does most of the work. The include first checks if the player who was shot is an NPC or if any of them is inside a vehicle or if any of them is surfing or if any of them has a packet loss percentage over the maximum allowed limit or if the shooter was using a weapon which has been blacklisted from aimbot checks or if any of the player has a very high ping. It skips the aimbot checks if any of these turn out to be true since players satisfying at least one of those conditions have the potential to trigger false warnings.

Once those preliminary tests are passed, it begins its aimbot checks on the player. First it checks if the victim was moving and then increments the continuous shots fired count if so. Then it checks if the shot was fired within the maximum range of the weapon. If the test gives a positive, a warning counter is incremented. Now the check is for proaim where server compares the distances between the two players, victim's position and the location where the bullet hit using the information provided by GetPlayerLastShotVectors and keeps a track of number of times it suspects for proaim. Lastly it checks if the shooter was aiming at the victim when the bullet hit. If he wasn't aiming then it increments another counter which keeps a the number of times these randomly aimed shots happen. If any of these counters exceed the their respective limits then OnPlayerSuspectedForAimbot is called. If a player misses a shot all the warning counters are reset.

What/Why/When are warnings issued?
In the latest version, BustAim can trigger 4 types of warnings.
  • WARNING_OUT_OF_RANGE_SHOT
  • WARNING_RANDOM_AIM
  • WARNING_CONTINOUS_SHOTS
  • WARNING_PROAIM_TELEPORT

WARNING_OUT_OF_RANGE_SHOT
Every bullet weapon in GTA:SA has a maximum range within which the weapon can be fired. If the player somehow manages to shoot another player beyond this limit then this warning will be issued after it happens a couple of times. This happens frequently with players who are using proaim.

WARNING_RANDOM_AIM
If one wants to shoot another player, he has to first aim at the player. If the player doesn't aim at the player but the bullets still hit the player then this warning is triggered after it occurs few times continuously. This happens frequently with players who are using proaim.

WARNING_CONTINOUS_SHOTS
This warning is issued when each and every bullet shot by player hits another player who is moving. This warning is triggered for almost every aimbot. This warning's sole purpose is to bring to the notice of the online administrators that he could be using an aimbot.

WARNING_PROAIM_TELEPORT
This warning is triggered when a player's bullet vector data and the player position data are not consistent. This warning is triggered for players who use proaim.

Installing & Configuration
To install BustAim, you need to first download the include and then paste it in the pawno/includes folder. To use the anti-aimbot, you need to include BustAim.inc and then add the following callback to your script.

Code:
public OnPlayerSuspectedForAimbot(playerid, hitid, weaponid, warnings)
Configuration:
BustAim provides lot of configurable options. You must define the a configurable setting with an appropriate value before including the script or else the default value will be assumed. Note that it is not compulsory to define every option/setting.

SettingDefaultDescription
BUSTAIM_MAX_PL_PERCENTAGE5 by defaultIf either the victim or the shooter has a Packet Loss Percentage above this limit then the aimbot checks are skipped for the player.
BUSTAIM_MAX_PING600 by defaultThe checks are done if and only if the player has a ping lesser than BUSTAIM_MAX_PING.
BUSTAIM_SKIP_WEAPON_IDSMinigun(38) by defaultList of blacklisted weapons ids where each id is delimited by a comma. Aimbot checks are not done for the players who are using any of those weapons.
BUSTAIM_DEFAULT_PLAYER_FLAGSWill perform all types of aimbot checks on the playerRefer SetPlayerFlags for more information
BUSTAIM_MAX_CONTINOUS_SHOTS10 by defaultNumber of shots that must hit a player moving player continuously before BustAim issues a warning.
BUSTAIM_OUT_OF_RANGE_PROBES2 by defaultHow many times a player can shoot another player continuously who is out of the weapon's range.
BUSTAIM_PROAIM_TELEPORT_PROBES3 by defaultNumber of times a player can teleport another player to shoot before BustAim issues a warning.
MAX_B2V_DEVIATION15 SA UnitsIf the distance between the bullet hit position and the affected player is larger than this limit then it will be counted as a teleport.
BUSTAIM_RANDOM_AIM_PROBES5 by defaultNumber of times a player can shoot without aiming before BustAim issues a warning.
MIN_DIST_FOR_AIM_CHECKS10 SA UnitsThe players have to be MIN_DIST_FOR_AIM_CHECKS apart for Random Aim Checks to be done.
BUSTAIM_PLAYER_SPHERE_RADIUS3 SA UnitsThe radius of a virtual sphere around which if a player shoots is a valid shoot.
BUSTAIM_WSTATS_SHOTS3Number of shot information that must be stored before issuing a warning(WSTATS is supported only for Teleport,Aim and Range Warnings)
BUSTAIM_DISABLE_PROFILINGNOT DEFINEDWill disable shots profiling
BUSTAIM_DISABLE_WSTATSNOT DEFINEDWill disable shot information recording before issuing a warning(WSTATS is supported only for Teleport,Aim and Range Warnings)
BUSTAIM_IS_PAUSED_FUNCTIONNot definedIf you already have an AFK detection system, then set this define to the function name which tells if a player is AFK or not (Example give below)

Examples:
Code:
#define BUSTAIM_IS_PAUSED_FUNCTION IsPlayerPaused //BustAim will pass the player id as argument
#define BUSTAIM_MAX_PING 500
#define BUSTAIM_SKIP_WEAPON_IDS 38,37,36

#include <BustAim>
Callbacks & Functions
Callback:
OnPlayerSuspectedForAimbot
Definition:OnPlayerSuspectedForAimbot(playerid,hitid,weaponid ,warnings)
Description:This callback is called whenever BustAim has warnings to be issued
Parameters:
  • playerid is the player who is suspected to be using the hack
  • hitid is the player who was affected
  • weaponid is the weapon which the suspect used to cause damage
  • warnings has bits which are turned on to indicate the warnings for which the callback was called
Return:Returning any non-zero number will disable the aimbot checks for the player.

How to use the warnings parameter
This parameter has bits turned on to indicate the warnings for which the callback was fired.

Every variable is essentially just a combination of bits where a particular arrangement of bits represents a particular number.Each bit of the warning parameter represents a warning. You have to check individual bits to know for which warnings the callback was called. This system is similar to keys and therefore you must check OnPlayerKeyStateChange if you have no idea about the bit testing.

If you wanted to know if the callback was called for RANDOM AIM then you need to use the following code
Code:
if(warnings & WARNING_RANDOM_AIM)
{
        //Random Aim
}
Do NOT use the following code to check warnings
Code:
if(warnings == WARNING_RANDOM_AIM)
{
        //Random Aim
}
This will only work when the callback was exclusively called for RANDOM AIM Warning. If the callback was triggered for Random Aim along with other warnings then this check will fail.

To check for multiple warnings, use the following code
Code:
if(warnings & WARNING_RANDOM_AIM && warnings & WARNING_PROAIM_TELEPORT)
{
      //Callback was triggered for both teleport as well as random aim
}
Example Code:
Code:
new ids[MAX_PLAYERS]; //Needs to be reset on OnPlayerConnect
public OnPlayerSuspectedForAimbot(playerid,hitid,weaponid,warnings)
{
	new str[144],nme[MAX_PLAYER_NAME],wname[32],Float:Wstats[BUSTAIM_WSTATS_SHOTS];
	
	ids[playerid]++;
	GetPlayerName(playerid,nme,sizeof(nme));
	GetWeaponName(weaponid,wname,sizeof(wname));
	if(warnings & WARNING_OUT_OF_RANGE_SHOT)
	{
	    format(str,256,"[%d]%s(%d) fired shots from a distance greater than the %s's fire range(Normal Range:%f)",ids[playerid],nme,playerid,wname,BustAim::GetNormalWeaponRange(weaponid));
		SendClientMessageToAll(-1,str);
		BustAim::GetRangeStats(playerid,Wstats);
		format(str,256,"Shooter to Victim Distance(SA Units): 1)%f 2)%f 3)%f",Wstats[0],Wstats[1],Wstats[2]);
		SendClientMessageToAll(-1,str);
	}
	if(warnings & WARNING_PROAIM_TELEPORT)
	{
	    format(str,256,"[%d]%s(%d) is using proaim (Teleport Detected)",ids[playerid],nme,playerid);
		SendClientMessageToAll(-1,str);
		BustAim::GetTeleportStats(playerid,Wstats);
		format(str,256,"Bullet to Victim Distance(SA Units): 1)%f 2)%f 3)%f",Wstats[0],Wstats[1],Wstats[2]);
		SendClientMessageToAll(-1,str);
	}
	if(warnings & WARNING_RANDOM_AIM)
	{
	    format(str,256,"[%d]%s(%d) is suspected to be using aimbot(Hit with Random Aim with %s)",ids[playerid],nme,playerid,wname);
		SendClientMessageToAll(-1,str);
		BustAim::GetRandomAimStats(playerid,Wstats);
		format(str,256,"Random Aim Offsets: 1)%f 2)%f 3)%f",Wstats[0],Wstats[1],Wstats[2]);
		SendClientMessageToAll(-1,str);
	}
	if(warnings & WARNING_CONTINOUS_SHOTS)
	{
	    format(str,256,"[%d]%s(%d) has fired 10 shots continously with %s(%d)",ids[playerid],nme,playerid,wname,weaponid);
		SendClientMessageToAll(-1,str);
	}
	return 0;
}
Functions
BustAim provides many functions that can be used to get useful data that BustAim has collected.

GetPlayerWeaponProfile
BustAim keeps a log of players shots for each weapon which can be obtained using this function.

Definition:BustAim::GetPlayerWeaponProfile(playerid,weaponid, &allshots,&hitshots,&max_cont_shots,&out_of_range_ warns,&random_aim_warns,&proaim_tele_warns)
Parameters:
  • playerid is the playerid whose profile is needed
  • weaponid is the id of the weapon. BustAim keeps a separate profile for each weapon.
  • allshots is the number of shots the player fired since the last profile reset
  • hitshots is the number of shots that has hit players since the last profile reset
  • max_cont_shots is the number of shots that were fired which hit a moving player continuously. This gives the player's best record for the given weapon.
  • out_of_range_warns is the number of Out Of Range Warnings that were issued for the player for the given weapon
  • random_aim_warns is the number of times the player was detected for randomly aimed shots for the given weapon
  • proaim_tele_warns is the number of times the player was detected for proaim teleport warnings for the given weapon
Returns:Returns 1 if an invalid weapon id is passed else returns 0
Remarks:No checks are done on playerid, passing an invalid playerid may lead to a crash

ResetPlayerWeaponProfile
Resets a player's profile for a particular weapon

Definition:BustAim::ResetPlayerWeaponProfile(playerid,weaponi d)
Parameters:
  • playerid is the id of the player whose profile must be reset
  • weaponid is the id of the weapon whose profile must be reset
Returns:Returns 1 if an invalid weapon id is passed else returns 0
Remarks:No checks are done of playerid, passing an invalid playerid may crash the server

GetPlayerProfile
Passes the information which BustAim collected for individual weapons after combining all the information of different weapons into one profile.

Definition:BustAim::GetPlayerProfile(playerid,&shotsfired,&sh otshit,&max_cont_shots,&out_of_range_warns,&random _aim_warns,&proaim_tele_warns)
Parameters:
  • playerid is the playerid whose profile is needed
  • allshots is the number of shots the player fired since the last profile reset
  • hitshots is the number of shots that has hit players since the last profile reset
  • max_cont_shots is the number of shots that were fired which hit a moving player continuously. This gives the player best record.
  • out_of_range_warns is the Out Of Range Warnings that were issued for the player with all weapons
  • random_aim_warns is the number of times the player was detected for randomly aimed shots with all weapons
  • proaim_tele_warns is the number of times the player was detected for proaim teleport warnings with all weapons
Returns:Does not return any specific value
Remarks:No checks are done of playerid, passing an invalid playerid may crash the server

ResetPlayerProfile
Resets all weapon profiles

Definition:BustAim::ResetPlayerProfile(playerid)
Parameters:
  • playerid is the id of the player whose profile must be reset
Returns:Does not return any specific value
Remarks:No checks are done of playerid, passing an invalid playerid may crash the server

GetAimStats
Gets last recorded Aim Warning Stats

Definition:BustAim::GetAimStats(playerid,Float:arr[],sz = sizeof(arr))
Parameters:
  • playerid is the id of the player whose warning stats are needed
  • arr where the warning stats must be saved
  • sz the sizeof arr
Returns:Does not return any specific value
Remarks:Every player is enclosed in a virtual sphere of radius BUSTAIM_PLAYER_SPHERE_RADIUS. his function gives the perpendicular distance between the line/path which a normal bullet would take and the player who was shot. Ideally this line/path should go through the player.

Greater this value , higher is the probability of the player using aimbot.
Ideal range is around 0-2 GTA SA Units.

See Also:OnPlayerSuspectedForAimbot Callback example to know how to use these WSTATS functions

GetTeleportStats
Gets last recorded Teleport Warning Stats

Definition:BustAim::GetTeleportStats(playerid,Float:arr[],sz = sizeof(arr))
Parameters:
  • playerid is the id of the player whose warning stats are needed
  • arr where the warning stats must be saved
  • sz the sizeof arr
Returns:Does not return any specific value
Remarks:Gives distance between the bullet hit position and the victim for the last few shots for which the warning was triggered

Greater this value , higher is the probability of the player using proaim.
The warning is triggered when the deviation turns out to be more than MAX_B2V_DEVIATION.

See Also:OnPlayerSuspectedForAimbot Callback example to know how to use these WSTATS functions

GetRangeStats
Gets last recorded Range Warning Stats

Definition:BustAim::GetRangeStats(playerid,Float:arr[],sz = sizeof(arr))
Parameters:
  • playerid is the id of the player whose warning stats are needed
  • arr where the warning stats must be saved
  • sz the sizeof arr
Returns:Does not return any specific value
Remarks:Gives the distance between two players for last few shots for which Range Warning was triggered

See Also:OnPlayerSuspectedForAimbot Callback example to know how to use these WSTATS functions

GetNormalWeaponRange
Gives the normal firing range for the given weapon

Definition:BustAim::GetNormalWeaponRange(weaponid)
Parameters:
  • weaponid of the weapon whose normal firing range is required
Returns:Does not return any specific value

SetPlayerFlags
Set the player flags

Definition:BustAim::SetPlayerFlags(playerid,flags)
Parameters:
  • playerid is the id of the player whose flags must be set
  • flags is the integer after setting the appropriate bits
Returns:Does not return any specific value
Remarks:No checks are done of playerid, passing an invalid playerid may crash the server

List of all player flags:
  • CHECK_FOR_OUT_OF_RANGE_SHOTS - Check the player for out of range shots
  • CHECK_FOR_PROAIM_TELEPORT - Check the player for proaim induced teleport
  • CHECK_FOR_RANDOM_AIM_SHOTS - Check the player for random aim shots
  • CHECK_FOR_CONTINOUS_SHOTS - Keep track of shots that continuously hit players
  • IGNORE_PLAYER - Do not check the player for anything
Returns:Does not return any specific value
Remarks:No checks are done of playerid, passing an invalid playerid may crash the server

To create a flag, you just have to simply create a variable first.The flags are interpreted by BustAim according to the bits that are set.

To set a bit, use the following code
Code:
new myflags = CHECK_FOR_OUT_OF_RANGE_SHOTS;
To set multiple bits, use the following code
Code:
new myflags = CHECK_FOR_OUT_OF_RANGE_SHOTS | CHECK_FOR_CONTINOUS_SHOTS;
GetPlayerFlags
Returns the player flags

Definition:BustAim::GetPlayerFlags(playerid,&flags);
Parameters:
  • playerid is the id of the player whose flags must be returned
  • flags is the variable where the flags have to be copied to
Returns:Does not return any specific value
Remarks:No checks are done of playerid, passing an invalid playerid may crash the server

ResetPlayerFlags
Set the player flags to default flags

Definition:BustAim::ResetPlayerFlags(playerid);
Parameters:
  • playerid is the id of the player whose flags must be set to default
Returns:Does not return any specific value
Remarks:No checks are done of playerid, passing an invalid playerid may crash the server

Example Code showing how these functions can be used.
Code:
COMMAND:profile(playerid,params[])
{
	new id;
    if(sscanf(params, "u",id))
	{
	    return SendClientMessage(playerid, 0xFF0000AA, "Usage:/profile [PlayerID/Name]");
	}
    new allshots,hitshots,max_cont_shots,out_of_range_warns,random_aim_warns,proaim_tele_warns,backward_shot_warns;
    BustAim::GetPlayerProfile(id,allshots,hitshots,max_cont_shots,out_of_range_warns,random_aim_warns,proaim_tele_warns,backward_shot_warns);
	new str[144],name[MAX_PLAYER_NAME];
	GetPlayerName(id,name,MAX_PLAYER_NAME);
	format(str,144,"BustAim Profile of %s(%d):Complete Profile:Stats of all weapons",name,id);
	SendClientMessage(playerid,COLOR_GREEN,str);
	format(str,144,"Fired:%d Hits:%d Hit(%%):%.2f MaxContinousShots:%d Bullets OutOfRangeWarns:%d RandomAimWarn:%d TeleportWarns:%d BackwardShotWarns:%d",allshots,hitshots,((hitshots*100.0)/allshots),max_cont_shots,out_of_range_warns,random_aim_warns,proaim_tele_warns,backward_shot_warns);
	SendClientMessage(playerid,COLOR_GREEN,str);
	return 1;
}
COMMAND:wprofile(playerid,params[])
{
    new id,wid;
    if(sscanf(params, "ui",id,wid))
	{
	    return SendClientMessage(playerid, 0xFF0000AA, "Usage:/wprofile [PlayerID/Name] [WeaponID]");
	}
    new allshots,hitshots,max_cont_shots,out_of_range_warns,random_aim_warns,proaim_tele_warns,backward_shot_warns;
    BustAim::GetPlayerWeaponProfile(playerid,wid,allshots,hitshots,max_cont_shots,out_of_range_warns,random_aim_warns,proaim_tele_warns,backward_shot_warns);
	new str[144],name[MAX_PLAYER_NAME],wname[32];
	GetPlayerName(id,name,MAX_PLAYER_NAME);
	GetWeaponName(wid,wname,32);
	format(str,144,"BustAim Weapon Profile of %s(%d):Stats of Weapon %s(%d)",name,id,wname,wid);
	SendClientMessage(playerid,COLOR_GREEN,str);
	format(str,144,"Fired:%d Hits:%d Hit(%%):%.2f MaxContinousShots:%d Bullets OutOfRangeWarns:%d RandomAimWarn:%d TeleportWarns:%d BackwardShotWarns:%d",allshots,hitshots,((hitshots*100.0)/allshots),max_cont_shots,out_of_range_warns,random_aim_warns,proaim_tele_warns,backward_shot_warns);
	SendClientMessage(playerid,COLOR_GREEN,str);
	return 1;
}
COMMAND:reset(playerid,params[])
{
    BustAim::ResetPlayerProfile(playerid);
    SendClientMessage(playerid,COLOR_GREEN,"Your profile has been reset for all weapons");
	return 1;
}
COMMAND:wreset(playerid,params[])
{
	new tmp;
	if(sscanf(params, "i",tmp))
	{
	    return SendClientMessage(playerid, 0xFF0000AA, "Usage:/wprofile [WeaponID]");
	}
    BustAim::ResetPlayerWeaponProfile(playerid,tmp);
    SendClientMessage(playerid,COLOR_GREEN,"Your weapon profile has been reset.");
	return 1;
}
Administrator's Guide
BustAim is designed to work with online administrators. It is never safe to allow a server to ban a player based on warnings which BustAim triggers. There should be an administrator to confirm if the player is really using an aimbot. BustAim will only help administrators by providing warnings when it suspects of a player to be using aimbot so that administrators are aware of it. It also provides profiling functions which will give further information about the player.

There are 4 types of warnings currently supported out of which only 3 are genuine warnings. The Continuous Shot warning is only there to back up BustAim's claims since it is very likely that a player using an aimbot will be able to shoot bullets that hit a player continuously. This warning can also be used to identify all kinds of aimbots.

What should you do when you receive a warning?
When BustAim triggers a warning, it means that there is something unusual with the player for whom the warning was triggered. You have to immediately spectate the player and watch for signs for possible aimbot. Try checking if the player is desynced or is lagging heavily since these can cause false warnings. If he is desynced or lagging heavily then kick the player before he causes more trouble.

A common mistake which administrators make is banning the player if the bullets deviate their normal straight line path. Remember that bullets can deviate from the gun when a player shoots. This happens due to lagcomp and is NOT aimbot. Of course, if it happens when lagcomp is disabled then the player could be using an aimbot.

If the player who has been suspected has a ping above 200 or so then you might sometimes observe the player shooting another player backwards (even this happens due to lagcomp). This doesn't necessarily mean that he is using aimbot.

Do not take action when you see a warning. Wait for some more time because if a player is really using an aimbot, the there is a high chance that the warnings will be triggered again. The warnings might as well get spammed.

Also note that BustAim doesn't detect all types of aimbots. It can detect only proaim and few other aimbots which trigger random aim warnings. It cannot detect Skin Aimbot and other similar aimbots. The administrator must rely on continuous shot warnings and the profiling feature to check players for such aimbots.

How to interpret WSTATS?
Warning Stats, WSTATS, is a BustAim Feature which packs and sends some additional information about the warning which was triggered.

Range Stats gives you the distance b/w the shooter and the victim for the last 3 shots before the warning was triggered. The players who use proaim can shoot players who are very far away with any weapon.

Teleport Stats gives you Bullet to Victim Distance. If a bullet hits a player then you would expect that the bullet's hit co-ordinates should coincide with the victim's position or at least be close to him. But this is not true always. If a player uses proaim then this distance offset can range from 10 to even hundreds of units. When a player shoots another player using proaim, the victim is teleported in front of the shooters screen to shoot. So the bullet actually stops at the teleported position of the player. Using the bullet's stop position and comparing it with the victim's actual position we can find out if a player is using proaim. The numbers which are passed along with teleport stats are the amount by which the shooter teleported another player to shoot. Also note that desynced players can triggered false warnings.

Normal Bullet to Victim distances range from 0.1 to 0.5. If this distance turns out to be 10,50,100 then the player is using proaim. The higher the value, you can be more certain that the player is using proaim. If the value goes way above 320 then the player is probably desynced.

Aim Stats gives you how off the shooters aim was from the victim when he shot. To get an idea about what these numbers really mean, we'll see how these numbers are calculated. A virtual straight line (in direction in which the shooter is aiming) is drawn from the shooter's weapon and extends to infinity. The player is treated as a point whose co-ordinates are his position co-ordinates. The perpendicular distance from the line to the point is called aim offset. This distance is what is given by Aim Stats. Anything above 2 is not normal. The larger this value the more bad was the shooter's aim.

Effects of Lag on detection algorithm
As explained earlier, BustAim detects players using proaim by comparing distances. This means the players who are lagging (send information late) might send position information very late which might cause false warnings. The lagging player might have moved a lot of distance before he sent the update. When the server checks the distances , it will find that the distance between the lagging player's position and the bullet end position to be greater than 25 and trigger a warning even though the shooter did not use proaim.

Here is a situation when you might get false warnings. Lets imagine two player A and B with pings 400 and 300 are fighting with each other. Suppose player B teleports somewhere for some reason (could be a respawn or any other valid teleport) when A was shooting. Player A won't notice the teleport immediately and he will keep shooting. Since B has a lower ping, he will inform the server about the teleport before A. When player A sends his updates telling that he shot him just before the teleport, BustAim will now compare the distances b/w the players and find that the players are very far away (B has told the server that he has teleported and A sends his bullet updates later) and therefore trigger a false warning.

This is rare because such teleports are rare. In case if this was the cause of a warning then you will see only one or two warnings because these teleports cannot happen very often. If a player really uses proaim then the player would trigger warnings frequently.

False Warnings will also be triggered when the shooter goes AFK immediately after shooting (what happens is the updates are not sent when the player goes AFK instead they will be sent after the player returns from AFK).

Identifying desynced players using Proaim Warnings
If a player is using proaim, he can use it on the players who are within a fixed distance (I am sure that this fixed distance is less than 400). So if you ever see a deviation greater than 400 it would be weird. Such deviations are not normal and they are not because of proaim. Then what triggered it? A desynced player! A desynced player won't send proper updates in time, so the BustAim will have wrong information based on which it will trigger warnings. What should you do when you find such absurd numbers? Spectate the player and find out if he is desynced, if he is desynced then better get him out of the server before he causes more trouble.

How to use profile functions?
If your owner is good then he will probably have installed commands to get profile information(example code has been given in this thread). There are two types of profiles, namely Weapon Profile and Overall Profile. These profiles contain information which are listed below:
  • Number of shots fired by a player using a particular weapon
  • Number of shots which hit another player
  • Number of times player was detected for proaim
  • Number of times the player was detected for random aim shots
  • Number of times the player was detected for Out of range shots

A Weapon Profile has the above information for a particular weapon whereas a complete profile has combined information of all weapons. The total shots fired by all weapons, total shots that hit irrespective of which weapon was used, number of times specific warnings were detected irrespective of the weapon,etc are the information which comes with complete Profile.

Download
GitHub

BustAim Demo Gamemode

Change Log
First Version
20/4/2015

Changes from 1.0 to 1.1:
1/5/2015
  • Added Backward Shot Detection
  • Optimizations & Large Improvements
  • Added more settings

Changes from 1.1 R1 to 1.1 R2:
2/5/2015
  • Minor Improvements

Changes from 1.1 R2 to 1.1 R3:
3/5/2015
  • More accurate detections
  • Made improvements to Backward Shot Detection

Changes from 1.1 R3 to 1.2:
7/5/2015
  • Revised the whole include
  • 1000% less false warnings
  • Added Out of Weapon Range Shot Detection
  • Added new functions
  • Changed the callback warning system
  • Added player flags

Changes from 1.2 to 1.2.1:
14/5/2015
  • Renamed few functions(functions that are used within BustAim)
  • Added Return Handling for OPSFA
  • Minor Fixes & Indentations

Changes from 1.2.1 to 1.2.2:
15/5/2015
  • Added new settings which allows disabling profiling to save CPU
  • Added WSTATS feature and a setting to disable it
  • Changed default settings
  • Updated to Hook Method 7 from #EMIT Method

Changes from 1.2.2 to 1.2.3:
31/5/2015
  • Bug Fix (Wrong Detections when player goes AFK)

Changes from 1.2.3 to 1.2.4:
1/6/2015
  • Bug Fix (False Range Warnings)

Changes from 1.2.4 to 1.2.5:
8/6/2015
  • Increased Weapon Ranges by 10 units above normal
  • Changed AFK Detection method to OPU
  • Added new setting where you can provide IsPlayerPaused function if he has(if not given, BustAim will make its own AFK Detection System)
  • Optimized Default Settings(PL % & Ping)

Changes from 1.2.5 to 1.2.6:
13/6/2015
  • Improvements
  • Bug Fix - Thanks to Su37Erich
  • Changed default settings

Changes from 1.2.6 to 1.2.6.1:
13/7/2015
  • GetNormalWeaponRange Fix

Changes from 1.2.6.1 to 1.2.6.2:
8/8/2015
  • GetPlayerProfile Bug Fix
  • Ping Check Fix

Changes from 1.2.6.2 to 1.2.7:
2/9/2015
  • Removed Backward Shot Detection
  • Clean Up
  • Improvements in Performance
  • Default Settings Changed

The change log is NOT being maintained anymore.


Credits
Development Team:
Yashas - Made BustAim
RedShirt & niCe & JernejL for camera/aiming functions
Slice for the information regarding Maximum Weapon Firing Range

Beta-Testing Team:
ipsLeon - helped me in conducting vigorous tests on BustAim's first few releases
Airman123 - Owner of Cruel World Deathmatch Server
Unforgiven - Administrator from Cruel World Deathmatch Server

Thanks to:
ipsLeon & Kyance for their aimbot detectors
Pottus for constructive criticism

Last edited by Yashas; 25/01/2017 at 02:08 PM.
Yashas is offline   Reply With Quote
Old 07/05/2015, 12:29 PM   #2
LMaxCo
Big Clucker
 
Join Date: Dec 2014
Location: Indonesia
Posts: 158
Reputation: 11
Default Re: BustAim - Detects players using aimbot

Very Good Job.
LMaxCo is offline   Reply With Quote
Old 07/05/2015, 08:58 PM   #3
HyperionSU
Little Clucker
 
Join Date: Aug 2014
Location: London, UK
Posts: 23
Reputation: 0
Default Re: BustAim - Detects players using aimbot

What if an innocent player shoots another player without aiming? Will WARNING_RANDOM_AIM be triggered?
Also, I don't think there's any aimbot which turns the player 180 degrees to shoot the player behind him.
HyperionSU is offline   Reply With Quote
Old 07/05/2015, 09:08 PM   #4
Dayvison_
High-roller
 
Dayvison_'s Avatar
 
Join Date: Nov 2013
Posts: 1,325
Reputation: 200
Default Re: BustAim - Detects players using aimbot

I will test, even so good work
__________________


Dayvison_ is offline   Reply With Quote
Old 08/05/2015, 04:11 PM   #5
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 870
Reputation: 296
Default Re: BustAim - Detects players using aimbot

Quote:
Originally Posted by HyperionSU View Post
What if an innocent player shoots another player without aiming? Will WARNING_RANDOM_AIM be triggered?
Also, I don't think there's any aimbot which turns the player 180 degrees to shoot the player behind him.
You got that wrong.The aiming here is not the right click aim.

If a bullet has to hit a player, the shooter must be facing his weapon in the direction of the player.If the player aims somewhere else, the bullet won't hit the other player.It is possible to aim somewhere else and shoot a player using an aimbots.

Proaim can shoot a player who is behind him.That is the most common method which administrators adopt to find if a player is using proaim.

If you still haven't understood, then download proaim and test it on the bot in the TEST SERVER.

Last edited by Yashas; 17/06/2015 at 11:10 AM.
Yashas is offline   Reply With Quote
Old 09/05/2015, 08:01 PM   #6
keyvanik
Big Clucker
 
Join Date: Mar 2015
Posts: 101
Reputation: 0
Default Re: BustAim - Detects players using aimbot

Hi i have these errors plz help me
Attached Images
File Type: png error.PNG (5.4 KB, 115 views)
keyvanik is offline   Reply With Quote
Old 10/05/2015, 05:56 AM   #7
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 870
Reputation: 296
Default Re: BustAim - Detects players using aimbot

You cannot compile an include.Includes are meant to be used along with our gamemode/filterscript.

Create a new file called BustAim.inc in your pawno/includes folder.Copy the code (http://pastebin.com/THN9Eu6u) to the file.

Now open your gamemode/filterscript and type
Code:
#include <BustAim>
Copy the code given below and paste it in your script and compile.

Code:
public OnPlayerSuspectedForAimbot(playerid,hitid,weaponid,warnings)
{
	new str[144],nme[MAX_PLAYER_NAME],wname[32];
	GetPlayerName(playerid,nme,sizeof(nme));
	GetWeaponName(weaponid,wname,sizeof(wname));
 	if(warnings & WARNING_OUT_OF_RANGE_SHOT)
	{
	        format(str,256,"%s(%d) fired shots from a distance greater than the %s's fire range.",nme,playerid,wname);
		SendClientMessageToAll(-1,str);
	}
	if(warnings & WARNING_PROAIM_TELEPORT)
	{
	        format(str,256,"%s(%d) is using proaim (Teleport Detected)",nme,playerid);
		SendClientMessageToAll(-1,str);
	}
	if(warnings & WARNING_RANDOM_AIM)
	{
	        format(str,256,"%s(%d) is suspected to be using aimbot(Hit with Random Aim with %s)",nme,playerid,wname);
		SendClientMessageToAll(-1,str);
	}
	if(warnings & WARNING_BACKWARD_SHOT)
	{
	        format(str,256,"%s(%d) shot a player behind him with %s.",nme,playerid,wname);
		SendClientMessageToAll(-1,str);
	}
	if(warnings & WARNING_CONTINOUS_SHOTS)
	{
	       format(str,256,"%s(%d) has fired 10 shots continously with %s(%d)",nme,playerid,wname,weaponid);
		SendClientMessageToAll(-1,str);
	}
	return 0;
}
Yashas is offline   Reply With Quote
Old 11/05/2015, 07:34 AM   #8
fuckingcruse
Gangsta
 
Join Date: Nov 2014
Posts: 526
Reputation: 8
Default Re: BustAim - Detects players using aimbot

Nice (:
__________________
Hello all,
I am providing my scripting services at very low cost. You can expect a very good result of what feature you actually expect. PM me if you are interested.
fuckingcruse is offline   Reply With Quote
Old 11/05/2015, 02:08 PM   #9
Airman123
Big Clucker
 
Join Date: Aug 2014
Posts: 111
Reputation: 3
Default Re: BustAim - Detects players using aimbot

thats nice, really.
__________________
DM Server (Lag shot/ Lag Comp)
Airman123 is offline   Reply With Quote
Old 11/05/2015, 02:24 PM   #10
justice96
Guest
 
Posts: n/a
Default Re: BustAim - Detects players using aimbot

Yashas, I suggest to you. please, do not give a codes into the pastebin. it shows errors (loose indentation).
  Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detects match results Need help [GF]Logic Scripting Help 4 29/07/2012 07:24 AM
Function/Callback that detects... Torran Help Archive 12 24/01/2010 11:07 AM


All times are GMT. The time now is 02:11 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.