[Include] Nex-AC - Anticheat system

I have a question, does anybody succeeded to connect 2 player from the same IP on the server, then disconnect one and keep the other one connected.
Even with a bare script it seems to time out the player that stays on the server.
See: https://github.com/NexiusTailer/Nex-...ment-283683187

Thank you,
rt-2
Reply

Some of my users get kicked randomly for weapon hacking and they are not weapon hacking, or i get kicked for using Speedhack while i only have the speedboost on my server (SetVehicleSpeed)
Reply

Quote:
Originally Posted by Flamehaze7
Посмотреть сообщение
Some of my users get kicked randomly for weapon hacking and they are not weapon hacking
Can you give me some parts of the server-log at the moment of the kick?
Reply

I am going to guess that an IsPlayerInAnyVehicle check is not done before triggering a weapon hack warning.

Suppose a player is in a vehicle with AK47. You give the player an M4. This M4 will replace AK47 but GetPlayerWeaponData/GetPlayerWeapon will tell that the player has AK47.

The function starts returning correct values after the player exits the vehicle. Therefore, you need an IsPlayerInAnyVehicle check in weapon hack detection code.

This is why someone who works on an anti-cheat needs to own a server. There are countless bugs to be taken care of.
Reply

Quote:
Originally Posted by Yashas
Посмотреть сообщение
I am going to guess that an IsPlayerInAnyVehicle check is not done before triggering a weapon hack warning.

Suppose a player is in a vehicle with AK47. You give the player an M4. This M4 will replace AK47 but GetPlayerWeaponData/GetPlayerWeapon will tell that the player has AK47.

The function starts returning correct values after the player exits the vehicle. Therefore, you need an IsPlayerInAnyVehicle check in weapon hack detection code.
Why not to see the code?
In addition, as written in the wiki:
Quote:
Originally Posted by wiki.sa-mp.com/wiki/GetPlayerWeapon
Note: Prior to version 0.3z R1-2, when the player state is PLAYER_STATE_PASSENGER this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it.
So I also rechecked this situation and everything works without false positives. Nevertheless, thanks for the interest)
Reply

Can you edit your anticheat?
Instead of kicking anticheat should ban cheaters, flood / hacking / crashing attempts etc.
I tried to edit anticheat (to ban cheaters) but I failed...
Reply

Quote:
Originally Posted by mgos307
Посмотреть сообщение
Can you edit your anticheat?
Instead of kicking anticheat should ban cheaters, flood / hacking / crashing attempts etc.
I tried to edit anticheat (to ban cheaters) but I failed...
I think ban is too radical measure, even for crashers (where there are very few false detections compared to others).
Automatic punishment should only discourage the continued use of cheats, and not reduce the base of players, that's why I chose kick as the main punishment.

However, it can be changed using public OnCheatDetected in your script, see an example here.
Reply

New Version v1.9.21
Fixes:
* Tweaked SetPlayerAmmo function
* Fixed a bug in anti-GodMode in vehicle with a kick when shooting vehicle wheels
* Fixed anti-infinite ammo for AK-47 and m4

Download: GitHub
Reply

PHP код:
[14:27:42] [Nex-AC debugVeh model584seatid0vehicleid180
[14:27:42] [Nex-ACSuspicion on the ID 1. Reason code044 (2)
[
14:27:42] [partBOGD@N has left the server (1:2)
[
14:27:42] [debugRun time error 4"Array index out of bounds"
[14:27:42] [debug]  Attempted to read/write array element at negative index -1
[14:27:42] [debugAMX backtrace:
[
14:27:42] [debug#0 00012cfc in public OnPlayerUpdate (playerid=1) at E:\V1-1.1.1\pawno\include\nex-ac.inc:3377 
I saw this earlier
Reply

Shooting an M4 on localhost, i get instantly kicked for cheating.. Here's the log:

Код:
[Nex-AC debug] Fire rate: -1970475854, weaponid: 31, last weapon: 0
[Nex-AC] Suspicion on the ID 0. Reason code: 026 (3)
[Nex-AC debug] Weaponid: 31, Reload time: -1970475729, state: 1
[Nex-AC] Suspicion on the ID 0. Reason code: 026 (4)
[Nex-AC debug] Weaponid: 31, Reload time: -1970475618, state: 1
[Nex-AC] Suspicion on the ID 0. Reason code: 026 (4)
[part] TypeR has left the server (0:2)
Reply

A bit curious

pawn Код:
ac_fpublic ac_SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo)
{
    if(ac_ammo < -32768) ac_ammo = -32768; // <-
    else if(ac_ammo > 32767) ac_ammo = 32767;// <-
    SetPlayerAmmo(playerid, ac_weaponslot, ac_ammo);
    if(16 <= ac_weaponslot <= 43 && (ACInfo[playerid][acWeapon][ac_wSlot[ac_weaponslot]] > 0 ||
    ACInfo[playerid][acSetWeapon][ac_wSlot[ac_weaponslot]] > 0))
    {
        ACInfo[playerid][acNOPCount][1] = 0;
        ACInfo[playerid][acGiveAmmo][ac_wSlot[ac_weaponslot]] = ac_ammo;
        ACInfo[playerid][acGtcGiveAmmo][ac_wSlot[ac_weaponslot]] = GetTickCount();
    }
    return 1;
}
Whats the point of the first two lines in this function?
Reply

It makes sure that signed integer (Range -32768 to 32767) does not overflow.
So i guess that safeguard is just to avoid overflow and possible false detection caused by it...
Reply

New Version v1.9.22
Changes:
* Removed exception for taking golf club when leaving vehicle model 457
* Removed a check on the distance to the vehicle when player enter it (false detections were observed)
* Anti-reconnect will now be disabled if the settings are configured to connect more than 1 account from 1 IP
* When trying to flood OnVehicleMod and OnVehicleRespray, they will be desynced
* Changed some values in anti-flood

Special thanks to user rt-2 and everyone who participated in the development of the project!

Download: GitHub
Reply

That's damn awesome and excellent, also you're frequently updating it which is what impressed me actually.
Reply

Quote:
Originally Posted by Variable™
Посмотреть сообщение
That's damn awesome and excellent, also you're frequently updating it which is what impressed me actually.
Код:
if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
I won't be impressed until this is actually scripted properly. I am not even trying to say it doesn't work but the design is horrible and makes it unattractive to anyone trying to work with this code. Thus to me it isn't unusable because it doesn't work but unusable because the code is out to lunch design wise.
Reply

Fly Hack in vehicle not workink when u jumped from the hill properly.
Reply

speed hack works in rhino.
If you teleport anywhere he will produce a speedlight speed, and you will be kicked from reason: Speedhack.
Reply

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Код:
if(ac_i < ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
I won't be impressed until this is actually scripted properly. I am not even trying to say it doesn't work but the design is horrible and makes it unattractive to anyone trying to work with this code. Thus to me it isn't unusable because it doesn't work but unusable because the code is out to lunch design wise.
That line is perfect, what is your problem,
Maybe there's something i'm missing probably because I just woke up?

rt-2
Reply

(I guess) he meant to say that the code is too obscure, symbols' names aren't picked wisely (not self-explanatory) so it takes a while to understand how the include works in order to make changes to it.
Reply

can anyone show example anti cheat
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)