SA-MP Forums Archive
[FilterScript] Detect Autoaim (not joypad) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Detect Autoaim (not joypad) (/showthread.php?tid=306586)



Detect Autoaim (not joypad) - Whitetiger - 27.12.2011

Detect Autoaim

This does not and has never detected an external GTA:SA aimbot. this only detects autoaim if you enabled it in the Options->control setup INGAME MENU!

This script detects when a player is using autoaim and not joypad.

pretty simple, made it as an example; maybe someone here can improve my idea.

so here's how its done. GetPlayerTargetPlayer always returns 65535 (INVALID_PLAYER_ID) for players that are using autoaim (and joypad doesn't really matter - this will detect if you shoot your gun and are using AUTOAIM.) I don't know if this was intended or not by SA-MP devs. anyway, when you understand that GetPlayerTargetPlayer always returns 65535 I think its easy from there. don't know really where to post this. I posted my old joypad detection method in the tutorial section but people just cried. move it were-ever if i messed up. the accuracy is pretty damn good if i do say so myself - but i'm posting this so you guys can look at it and maybe improve it, or use it if you want to.

script: http://pastebin.com/gZ15TduQ

EDIT: the indention on pastebin is messed up. it should be okay when you paste it in PAWNO.

EDIT2: A lot of people still seem to be linking this topic and saying it can detect aimbot, so I'll say it again: THIS DOES NOT DETECT ANY AIMBOT AND WAS NEVER INTENDED TO. since 0.3z, if lag comp is enabled, you don't even need to read this, Joypad is already disabled in 0.3z and you don't need to worry about it.


Re: Detect Autoaim (not joypad) - Lorenc_ - 27.12.2011

Nice job!

pawn Код:
new bool:autoaim[MAX_PLAYERS]                            = {false, ...};
new checkautoaim[MAX_PLAYERS]                            = {9999, ...};
new LastTargeted[MAX_PLAYERS]                            = {-1, ...};
new pressingaimtick[MAX_PLAYERS]             = {-1, ...};
new bool:keyfire[MAX_PLAYERS]                            = {false, ...};
new bool:ispressingaimkey[MAX_PLAYERS]           = {false, ...};
new bool:CheckNextAim[MAX_PLAYERS]           = {false, ...};
However to mention, I think to set a specific value on all bits of a array it has to be like "{(value), ....}" but never mind me, that fix is optional.

Will come in handy for people thought!


Re: Detect Autoaim (not joypad) - FireCat - 27.12.2011

Awesome job there!


Re: Detect Autoaim (not joypad) - SpiderWalk - 27.12.2011

Great Job man i will use it!


AW: Detect Autoaim (not joypad) - asdfgh98 - 27.12.2011

Someone tested this? Does this really work? o.O


Re: Detect Autoaim (not joypad) - CyNiC - 27.12.2011

I did something like this FS and the shotguns are complicated to detect, but another weapons are good, with a warning count system and admins for confirm, you can know who is using auto-aim and do what you want.


Re: Detect Autoaim (not joypad) - xinix000 - 27.12.2011

Good Job I will test it


Re: Detect Autoaim (not joypad) - Psymetrix - 27.12.2011

Auto-aim in SA:MP? Some people just don't have a life!

I just have one question. If a player is using auto-aim in a server, will the target have to be stationery or does auto-aim not work like that? I ask because 99% of the time you have to lead your target.


Re: Detect Autoaim (not joypad) - Whitetiger - 27.12.2011

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Nice job!

pawn Код:
new bool:autoaim[MAX_PLAYERS]                            = {false, ...};
new checkautoaim[MAX_PLAYERS]                            = {9999, ...};
new LastTargeted[MAX_PLAYERS]                            = {-1, ...};
new pressingaimtick[MAX_PLAYERS]             = {-1, ...};
new bool:keyfire[MAX_PLAYERS]                            = {false, ...};
new bool:ispressingaimkey[MAX_PLAYERS]           = {false, ...};
new bool:CheckNextAim[MAX_PLAYERS]           = {false, ...};
However to mention, I think to set a specific value on all bits of a array it has to be like "{(value), ....}" but never mind me, that fix is optional.

Will come in handy for people thought!
done

Quote:
Originally Posted by TheGamer!
Посмотреть сообщение
Please use
pawn Код:
CallRemoteFunction("OnPlayerDetectedAutoaim", "d", playerid);
instead of

pawn Код:
OnPlayerDetectedAutoaim(playerid);
for use in another script
done


Quote:
Originally Posted by Psymetrix
Посмотреть сообщение
Auto-aim in SA:MP? Some people just don't have a life!

I just have one question. If a player is using auto-aim in a server, will the target have to be stationery or does auto-aim not work like that? I ask because 99% of the time you have to lead your target.
depends on how the server is scripted. if you use OnPlayerGiveDamage and SetPlayerHealth and SetPlayerArmour there will be no lead aim at all and it will sync properly. also it would be impossible to hack that way (or very easy to detect)

on either type of server (one that uses OnPlayerGiveDamage, and one that doesn't) the autoaim script will still work

...

yes it really works, go test it. this will detect AUTOAIM as stated in the first post
to detect if a player is using joypad use -> this


Re: Detect Autoaim (not joypad) - changeME - 13.01.2013

Nice helpfull to me