[Include] Nex-AC - Anticheat system

Hello!
in 26 I have a bug:

[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at index 1650596 past array upper bound 999
[debug] AMX backtrace:
[debug] #0 00018334 in public OnPlayerKeyStateChange (playerid=1650596, newkeys=1650596, oldkeys=0) at c:\sarp\pawno\include\nex-ac.inc:4504

Pawn code (all rest code by Shoebill):
Код:
#include <a_samp>
#include <a_mysql>
#include <core>
#include <float>
#include <time>
#include <mxINI>
#include <samp-net>

main(){}
public OnGameModeInit()
{
	SetGameModeText("SAMP-NET v17.7");
	return 0;
}

public OnPlayerCommandText(playerid, cmdtext[]) {
	return 1;
}

public OnPlayerText(playerid, text[]) {
	return 0;
}
Reply

Why am I having this kind of error? Even with the file nex-ac_en along with inc .... sorry my english
Reply

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
Sometimes when a player use /assist command , the anticheat detect as a repair hack and it set the health back that was before the car repair.
PHP код:
CMD:assist(playeridparams[])
{
    
//Send the command to all admins so they can see it
    
SendAdminText(playerid"/assist"params);
    
// Check if the player is the driver of a vehicle
    
if (GetPlayerVehicleSeat(playerid) == 0)
    {
        
// Fully repair the vehicle (damage value and bodywork)
        
RepairVehicle(GetPlayerVehicleID(playerid));
        
// Also re-fuel the vehicle
        
AVehicleData[GetPlayerVehicleID(playerid)][Fuel] = MaxFuel;
        
// Let the player pay for the repairs and refuel (default $2000)
        
RewardPlayer(playerid, -4000);
        
// Let the player know he spent $2000 for auto-repair because there were no assistance players online
        
SendClientMessage(playerid0xFFFFFFFF"{FF0000}Masina a fost reparata si realimentata pentru $400");
    }
    
// Let the server know that this was a valid command
    
return 1;

Edit: Log:
PHP код:
[13:04:24Simioniulian a folosit: /assist 
[13:04:24] [Nex-AC debugAC veh health953.588989veh health1000.000000vehicleid143
[13:04:24] [Nex-ACSuspicion on the ID 0. Reason code011 
This happens with custom-made anti repair cheats as well sadly, nothing much you can do about. Personally I hooked RepairVehicle function to repair the vehicle again after a given milisecond time period just so that if it was legitly repaired, then it would be repaired if it wasn't repaired in the first place.

In this function, a timer can be added to do similar. https://github.com/NexiusTailer/Nex-...x-ac.inc#L1391
Reply

Quote:
Originally Posted by spbruno
Посмотреть сообщение
Why am I having this kind of error? Even with the file nex-ac_en along with inc .... sorry my english
Your path to the file is wrong in my opinion. It says it can't read the file. This means it can't find it or doesn't have permissions to access it. Probably the path is wrong.
Reply

Quote:
Originally Posted by spbruno
Посмотреть сообщение
Why am I having this kind of error? Even with the file nex-ac_en along with inc .... sorry my english
You need to put in in same place as the include(so will be pawno > includes) both of them.


Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
This happens with custom-made anti repair cheats as well sadly, nothing much you can do about. Personally I hooked RepairVehicle function to repair the vehicle again after a given milisecond time period just so that if it was legitly repaired, then it would be repaired if it wasn't repaired in the first place.

In this function, a timer can be added to do similar. https://github.com/NexiusTailer/Nex-...x-ac.inc#L1391
I saw it happens when a player have ping(like 50+ or so). But i know its becasue of sync between client and server, so yeah...
Reply

This I do not understand,
The files are right in the included folder,
Even so the error,
I compile but the compiler hangs and does not get out of it
The server is upgraded in 0.3.7 r2 all right
I do not understand why you do not compile.
Can someone give me a tip?
Sorry for my English
Reply

How could I prevent ammo/weapon hack with this anti-cheat?
Reply

How To Send Warning To Admins Online
Reply

Quote:
Originally Posted by spbruno
Посмотреть сообщение
This I do not understand,
The files are right in the included folder,
Even so the error,
I compile but the compiler hangs and does not get out of it
The server is upgraded in 0.3.7 r2 all right
I do not understand why you do not compile.
Can someone give me a tip?
Sorry for my English
Try to open it by 'pawno.exe' which located in the folder next to the anticheat file

Quote:
Originally Posted by oMa37
Посмотреть сообщение
How could I prevent ammo/weapon hack with this anti-cheat?
Use public OnCheatDetected and AntiCheatGetWeaponData to return the real weapons to the player or just send warning to admins.

Quote:
Originally Posted by LifeIngame
Посмотреть сообщение
How To Send Warning To Admins Online
I think it will be useful.


New Version v1.9.27
Changes:
* Increased maximum speed onfoot
* Changed some delays that await server's functions performing
* Added protection against vehicle respray if default modshops is disabled
* Increased the number of warnings for protect against high ping
* Rewrote anti-teleport for Streamer pickups
* Removed AntiCheatGetClass function
* Minor fixes and improvements

Fixes:
* Fixed anti-money hack
* Fixed a bug in protection against NOP GivePlayerWeapon
* Fixed an anti-fakespawn bypass when cheater calls OnPlayerRequestSpawn before spawn
* Fixed false detections after long shooting from some weapons
* Fixed some variables resetting during player spawn
* Fixed anti-speedhack

Special thanks to user f0Re3t and everyone who participated in the development of the project!

Download: GitHub
Reply

Quote:
Originally Posted by Uberanwar
View Post
Bugs:

Passengers in my vehicle gets kicked for Teleport Hack (In Vehicle) when I went into a mod shop to mod my car, (me myself as a driver, along with passengers inside. they get kicked soon after)
Same situation with me! Some times my vehicle gets TPED back to its old position while driving, and yea that mod shop bug is there too.
Reply

I'd recommend people to modify this anti cheat to make it compatible as to your needs.
Reply

Quote:
Originally Posted by Logic_
View Post
I'd recommend people to modify this anti cheat to make it compatible as to your needs.
I do agree, I've done many modifications to avoid false detections.
Reply

I found it, it seems the knife is being detected as weapon hack. The knife is actually given scriptwisely but detected as hack.
Reply

Quote:
Originally Posted by Uberanwar
View Post
I found it, it seems the knife is being detected as weapon hack. The knife is actually given scriptwisely but detected as hack.
Can you show me the code (or a whole script, on which I could reproduce it) that gives this weapon at that moment?
Reply

Alright, I will privately message you the script shortly, hold on
Reply

Hi. I have a problem. When i exit from a HQ the ac kick me for using cheats. I disabled Ac for: http://prntscr.com/gfk81v. Video with the wrong kick: https://www.youtube.com/watch?v=-zDL...ature=youtu.be. Thx
Reply

Can someone help with this:
Код:
C:\Users\Josip\Desktop\ZMA2\pawno\include\YSI\y_va/impl.inc(568) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\Josip\Desktop\ZMA2\pawno\include\YSI\y_va/impl.inc(573) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\Josip\Desktop\ZMA2\pawno\include\YSI\y_hooks/impl.inc(2626) : warning 219: local variable "time" shadows a variable at a preceding level
C:\Users\Josip\Desktop\ZMA2\pawno\include\nex-ac.inc(1672) : warning 219: local variable "team" shadows a variable at a preceding level
C:\Users\Josip\Desktop\ZMA2\pawno\include\nex-ac.inc(3102) : warning 202: number of arguments does not match definition
C:\Users\Josip\Desktop\ZMA2\pawno\include\nex-ac.inc(3116) : error 025: function heading differs from prototype
C:\Users\Josip\Desktop\ZMA2\pawno\include\nex-ac.inc(6260) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply

Quote:
Originally Posted by Genjii1337
Посмотреть сообщение
BTW, i found the solution, etc etc
i have a new question, how can i send the alerts from AC(speedhack, aimbot, etc) in normal chat. (i have a public ABroadCast that sends message only for admin from my server).
Change admin level to 0.
Reply

Woah, this is a revolutionary include. R.I.P, the cheaters!
Reply

Fixed by updating YSI !!!
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)