Trying to detect aimbot in 0.3z
#1

I'm trying to make a aimbot detector.
this is my current code. The problem of the code is that the position of the camera will never match the positions of the targeted player. Any idea?

Quote:

#define MAX_POS 20
new CheckAim;
new PosActual[MAX_PLAYERS] ;
new Float:xpos[MAX_POS][MAX_PLAYERS],Float:ypos[MAX_POS][MAX_PLAYERS],Float:zpos[MAX_POS][MAX_PLAYERS];

public OnFilterScriptInit() {
CheckAim = SetTimer("ChecarAim",100,1);
return 1;

stock Float:Distance2D(Float:x1, Float:y1, Float:x2, Float:y2, bool:sqrt = true)
{
x1 -= x2;
x1 *= x1;

y1 -= y2;
y1 *= y1;

x1 += y1;

return sqrt ? floatsqroot(x1) : x1;
}
forward ChecarAim();
public ChecarAim()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerInAnyVehicle(i))
{

if(GetPlayerCameraMode(i) == 53)
{
new aimid;
aimid = GetPlayerTargetPlayer(i);
if(aimid != INVALID_PLAYER_ID)
{
new Float:xvec,Float:yvec,Float:zvec;
GetPlayerCameraFrontVector(i,xvec,yvec,zvec);
new Float: fDistance = GetPlayerDistanceFromPoint(aimid, xpos[PosActual[aimid]][aimid], ypos[PosActual[aimid]][aimid], zpos[PosActual[aimid]][aimid]);
PosActual[aimid]++;
if(PosActual[aimid] == MAX_POS)PosActual[aimid] = 0;
if(fDistance > 0.1 )
{
Apuntando[i]++;
if(Apuntando[i] == 20)
{
Apuntando[i] = 0;
new str[120];
for (new b = 0; b < MAX_POS; b++)
{
new Float:distance = Distance2D(xpos[b][aimid], ypos[b][aimid], xvec, yvec);
if(distance <= 1)
{
format(str,sizeof str,"%s sospechado de Aimbot %.2f %.2f %.2f %.2f",PlayerName2(i),xvec,yvec,xpos[b][aimid], ypos[b][aimid]);
for (new y = 0; y < MAX_PLAYERS; y++)
{
if(IsPlayerConnected(y) && IsPlayerAdmin(y))
{
SendClientMessage(y,-1,str);
}
}
}
}
}
}
else
{
Apuntando[i] = 0;
}
GetPlayerPos(aimid,xpos[PosActual[aimid]][aimid], ypos[PosActual[aimid]][aimid], zpos[PosActual[aimid]][aimid]);
}
else
{
Apuntando[i] = 0;
}
}
}
}
return 1;
}

Reply
#2

no idea
Reply
#3

~Delete~
Reply
#4

Quote:
Originally Posted by ZeroTheScyther
Посмотреть сообщение
~Delete~
If I delete, send many false reports. I need a way to check the center of the skin (OffsetX 0.0 , OffsetY 0.0) when the player shoots or aims.
Reply
#5

Do some research and use HitRatio as its one way to detect it, its still very difficult on sa-mp to detect aimbot, as some aimbots are very well programmed. However by using Hit Ratio you will at least detect the majority of aimbotters.
Reply
#6

Quote:
Originally Posted by angelxeneize
Посмотреть сообщение
If I delete, send many false reports. I need a way to check the center of the skin (OffsetX 0.0 , OffsetY 0.0) when the player shoots or aims.
Sorry, I said ~Delete~ cuz I posted something stupid before and wanted someone to delete my post.
Reply
#7

Quote:
Originally Posted by ZeroTheScyther
Посмотреть сообщение
Sorry, I said ~Delete~ cuz I posted something stupid before and wanted someone to delete my post.
Oh, im sorry xd
Reply
#8

What you are trying to do will not work and can not work, the best you can do is profile accuracy but only when a player is actually targeted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)