NexiusTailer / Nex-AC

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

kicked for code 002 #159

Closed rt-2 closed 4 years ago

rt-2 commented 4 years ago

Hi, Long time no talk (Thanks for all your work), I updated from 1.9.49 to 1.9.52 and I started having people being kicked when they were being moved. I have 2 main issues practically occurring (logs on the original issues), but it's the same issue I think:

In the logs, it seems the player have been teleported to the correct (intended) location but the anti-cheat picks it up as cheat. It is not happening all the time, only 1/3 or even less of the time.

Let me know how I can improve my testing. We are trying to find how to 'reproduce' those bugs and when we will be able I will create a testing filterscript to test. Thank you, rt-2

erfanasbari commented 4 years ago

I Had This Problem Too And i didn't find the solution but to ignore it. The code2 of your problem is 2. you have to store the code2 under OnCheatWarning and ignore the cheat under OnCheatDetected like this:

new P_code2[MAX_PLAYERS];
public OnCheatWarning(playerid, ip_address[], type, code, code2, count)
{
    P_code2[playerid] = code2;
}
public OnCheatDetected(playerid, ip_address[], type, code, code2)
{
    if (code == 2 && code2[playerid] == 2) return 1;
}

I Tested it and fixed the problem It Will Fix It Temporary.

Don't Worry The Player Still Kicks If uses Teleport hack. I tested it in many different ways and my client still cannot use teleport hack

I Had another issue with anti-teleport on player spawn and i think it will happens to you soon. when the player spawns and moved to jail right after it many time ac detects teleport cheat but i fixed it by:

changing static to new in this line and use this under OnCheatDetected:

if (code == 2)
{
    if (ACInfo[playerid][acSet][7] == 1) return 1;
}

I tested it multiple times and it works (if player use teleport hack at the same time most of the time he will kick for teleport hacking and sometimes for NOP and there is no way that the player can use teleport hacking)

However i dont recommend this because of changing codes is nex-ac.inc but it works for me

NexiusTailer commented 4 years ago

However i dont recommend this because of changing codes is nex-ac.inc but it works for me

And I don't recommend it too, first of all, because you don't solve the problem with this code at all just ignoring it.

As for the first message, would be cool to see some visualization of it (short video/screen from the player before he gets this), proper description of his actions before the detection and what code performs at the moment to understand the problem better and be able to reproduce this somehow.

rt-2 commented 4 years ago

I will see what I can do, it has not happened today, fingers crossed something fixed this....

NexiusTailer commented 4 years ago

So is there any new information about it?

rt-2 commented 4 years ago

Yes the problem is still happenning ( added informations on the original issues. I will remove the [1.9.49 -> 1.9.52] because I cannot be completly sure that the version change caused this. I will re-open the issue here if I am able to reproduce.