SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 12/05/2014, 04:52 PM   #1
Nils94
Little Clucker
 
Join Date: Nov 2011
Location: Germany
Posts: 22
Reputation: 0
Default Bust Cleo Port Aim

Hello, I work on a new SA-MP Gamemode.
My Anticheat works fine, but how can I detect Aim Cleo? (Aimbot)
The Aimbot teleport Players to your self. (2.0 Distance)

Last edited by Nils94; 12/05/2014 at 07:33 PM.
Nils94 is offline   Reply With Quote
Old 12/05/2014, 05:33 PM   #2
Nils94
Little Clucker
 
Join Date: Nov 2011
Location: Germany
Posts: 22
Reputation: 0
Default AW: Re: Bust ProAim.cs

Quote:
Originally Posted by Ralfie View Post
Get an anti teleport cheat.
Kick all teleporting players if an admin isnt online, notify when is.


DO NOT POST CHEAT NAMES HERE! PLEASE REMOVE IT!
Only Port by the Cheater. Not Server Side.
Nils94 is offline   Reply With Quote
Old 13/05/2014, 07:28 AM   #3
Madd92
Big Clucker
 
Join Date: Apr 2013
Location: Germany
Posts: 61
Reputation: 1
Default Re: Bust ProAim.cs

In this particular case you can take advantage of the fact that the cheating player will probably be shooting up to a few metres next to the target player and will still be hitting them.
So the callback OnPlayerWeaponShot can be used to calculate the distance between the target player's position and the actual aiming vector of the allegedly cheating player.
The functions needed to do this would be GetPlayerPos, GetPlayerCameraPos and GetPlayerCameraFrontVector. Instead of GetPlayerPos you could probably also use the fX, fY and fZ values that are passed to OnPlayerWeaponShot as parameters since the result might be more precise.

But keep in mind that most weapons have a certain maximum value of scatter. So the "allowed" distance between the bullet impact and the target player differs from weapon to weapon.
If you test a few weapons you will be able to estimate those distances by approximating them.

Please keep in mind that you should not automatically ban a player when the hit distance is above your calculated limit but rather send a message to the administrators so they can confirm the report.

I hope this helps you to get started.
Madd92 is offline   Reply With Quote
Old 17/05/2014, 11:43 AM   #4
Nils94
Little Clucker
 
Join Date: Nov 2011
Location: Germany
Posts: 22
Reputation: 0
Default AW: Bust ProAim.cs

Thank you for your information. But when I Shot on a Player, I get a other Position when I shot on a other San Andreas Object.
Nils94 is offline   Reply With Quote
Old 17/05/2014, 12:54 PM   #5
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,885
Reputation: 1351
Default Re: Bust ProAim.cs

None of these guys know what they are talking about.

Basically you get the last shot vectors of the shooter then get the distance of the player that was shot to the hit position if the variance is greater than 5.0 meters report to the admins. Please not this test will produce false positives however the people using it will set it off all the time then you ban them.


pawn Code:
#define MAX_SHOT_VARIANCE 5.0
    GetPlayerLastShotVectors(playerid, fOriginX, fOriginY, fOriginZ, fHitPosX, fHitPosY, fHitPosZ);
    dist = GetPlayerDistanceFromPoint(hitid, fHitPosX, fHitPosY, fHitPosZ);

    if(dist >= MAX_SHOT_VARIANCE && dist < 300.0)
Pottus is offline   Reply With Quote
Old 18/05/2014, 01:23 AM   #6
Nils94
Little Clucker
 
Join Date: Nov 2011
Location: Germany
Posts: 22
Reputation: 0
Default AW: Re: Bust ProAim.cs

Quote:
Originally Posted by [uL]Pottus View Post
None of these guys know what they are talking about.

Basically you get the last shot vectors of the shooter then get the distance of the player that was shot to the hit position if the variance is greater than 5.0 meters report to the admins. Please not this test will produce false positives however the people using it will set it off all the time then you ban them.
Thank you, it works! +1 Rep.
Nils94 is offline   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



All times are GMT. The time now is 10:09 AM.


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