NexiusTailer / Nex-AC

Anticheat system
https://pawn.wiki/index.php?/topic/27641-nex-ac/
GNU Lesser General Public License v3.0
213 stars 155 forks source link

False detection on teleport #264

Closed zXLiMiT-ToTAL closed 2 years ago

zXLiMiT-ToTAL commented 2 years ago

When a player is entering the vehicle as a passenger and the driver decides to teleport, (SetPlayerPos) the player who was entering the vehicle is falsely detected by the anti cheat.

[Nex-AC debug] Speed: 0, dist: 38.165164, dist set: 25000.000000

[Nex-AC debug] Dist: 3496.487792, dist set: 25000.000000, speed: 0, pos x, y, z: -1982.436279, 108.419189, 38.020820, old pos x, y, z: 1146.163330, -1452.606811, 15.903982

NexiusTailer commented 2 years ago

Share the full anticheat logs (as I don't understand who was detected in the first line and who in the second), and share the code so it can be possible to reproduce that.

zXLiMiT-ToTAL commented 2 years ago

new tests [Nex-AC debug] Dist: 2593.281494, dist set: 25000.000000, speed: 0, pos x, y, z: 2165.970703, 943.975830, 20.294466, old pos x, y, z: 1136.597045, -1436.250732, 15.796875 [Nex-AC] Suspicious player, ID 0. Reason code: 002 (2) [Nex-AC debug] Dist: 3776.582275, dist set: 25000.000000, speed: 0, pos x, y, z: -1985.149169, 110.201644, 38.023704, old pos x, y, z: 1313.624389, -1728.295166, 13.594498 [Nex-AC] Suspicious player, ID 1. Reason code: 002 (2) [Nex-AC debug] Dist: 2669.319824, dist set: 25000.000000, speed: 0, pos x, y, z: 2043.805175, 1006.954650, 21.517662, old pos x, y, z: 1397.871337, -1583.021728, 13.785035 [Nex-AC] Suspicious player, ID 1. Reason code: 002 (2)

CMD:lossantos(playerid) { SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); new vehicle = GetPlayerVehicleID(playerid); if(GetPlayerState(playerid) == 2) { SetVehiclePos(vehicle, 1396.1110+10, -1579.0890, 14.1103+10); SetVehicleZAngle(vehicle, 351.9701); } else { SetPlayerPos(playerid, 1396.1110, -1579.0890, 14.1103); SetPlayerFacingAngle(playerid, 351.9701); } SetCameraBehindPlayer(playerid); SendClientMessage(playerid, -1, "Los Santos"); return 1; }

zXLiMiT-ToTAL commented 2 years ago

Any solution to this problem?

NexiusTailer commented 2 years ago

Seems like it's silent teleport bug which was fixed by RogueDrifter on the server side. You can try it as standalone include or as a part of fixes.inc (FIX_SilentTeleport)

zXLiMiT-ToTAL commented 2 years ago

Added include and the problem continues.

include

include

include

[Nex-AC debug] Dist: 4123.988769, dist set: 25000.000000, speed: 0, pos x, y, z: -1985.727905, 108.429412, 38.017169, old pos x, y, z: 2044.480346, 982.482238, 10.863789 [Nex-AC] Suspicious player, ID 1. Reason code: 002 (2)

NexiusTailer commented 2 years ago

Which include order you have? Put your code in ``` if you can't display it by bare paste

zXLiMiT-ToTAL commented 2 years ago

The order of the includes is like this:

a_samp fixes nex-ac

The code is the same as above.

NexiusTailer commented 2 years ago

Try to include standalone silent-teleport fix after the anticheat (considering that fixes.inc will throw compile errors if it will be included not before anything that hooks samp functions, making it include after nex-ac will also be problematic, so that I recommend standalone include fix).

zXLiMiT-ToTAL commented 2 years ago

Even once it is included, the problem remains. Tested the Fsbstp include, below and above include.

[Nex-AC debug] Dist: 4121.944824, dist set: 25000.000000, speed: 0, pos x, y, z: -1985.615234, 108.927459, 37.976825, old pos x, y, z: 2041.975708, 985.400268, 10.881518

Another test: When the player tries to get on the bike, he is kicked and another nex-ac debug appears.

[Nex-AC debug] Veh model: 522, veh: 1, AFK time: 135, dist: 2616.471435

NexiusTailer commented 2 years ago

As for the first issue, I found some time to check what exactly fixes (FIX_SilentTeleport) and fsbstp do if it's not solving the problem and found out the reason: they consider silent teleport on driver's seat only, not passenger. You can propose to add passenger check as well in both libraries.

As for this:

[Nex-AC debug] Veh model: 522, veh: 1, AFK time: 135, dist: 2616.471435

I need more information about the case as usual.