[Include] Nex-AC - Anticheat system

All decision should pass by an callback an we choose what we want to make

Add an callback for that is my sugestion.
Reply

Quote:
Originally Posted by BlowUP
Посмотреть сообщение
Great anticheat but needs more optimizations or other ways of checking instead of OnPlayerpdate
i did a benchmark with this Slice benchmark function
Код:
Bench for ac_OnPlayerUpdate: executes, by average, 43.92 times/ms.
43 times in ms with 1 player and i have 100 pb that will probably make my server laggy.
I wouldn't say that will be too much an issue the main issues I mentioned here.
http://forum.sa-mp.com/showpost.php?...9&postcount=23

I would still maintain tossing all this code into a single include is a monumental design flaw for an anti-cheat system there should be an include for EACH cheat. The design of this system is completely non-extensible and has some serious array indexing flaws. In my opinion this is an example of how NOT to design an anti-cheat system.

Look at these code examples for the ridiculousness of some of the design choices.

Код:
if(ac_i < AntiCheatInfo[playerid][acCall][13] + ac_Mtfc[13][0]) ac_FloodDetect(playerid, 13);
                else if(ac_i < AntiCheatInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
                else AntiCheatInfo[playerid][acFloodCount][13] = AntiCheatInfo[playerid][acFloodCount][27] = 0;
Код:
                AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acNOPCount][4] = 0;
                AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acSetVehHealth] = health;
                AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acGtc][4] = GetTickCount();
I am really left shaking my head at this code as it is completely and utterly absurd.
Reply

Quote:
Originally Posted by Pottus
Посмотреть сообщение
I would still maintain tossing all this code into a single include is a monumental design flaw for an anti-cheat system there should be an include for EACH cheat .
This I agree with you I hope in futur he start to split his script and use the methods you said.
Reply

How it works anti infinite ammo, i want to make one so please give me an ideea.
Reply

Quote:
Originally Posted by jamal1992
Посмотреть сообщение
How it works anti infinite ammo, i want to make one so please give me an ideea.
I guess you can use the public OnPlayerWeaponShot (or something like that), and check if the weapon's ammo became less than it was before. If the ammo did not become less after the shot, then they're probably doing infi ammo.
Never tried it like this but when doing it the right way it should work fine.
Reply

all in one good anti cheat!
Reply

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
I guess you can use the public OnPlayerWeaponShot (or something like that), and check if the weapon's ammo became less than it was before. If the ammo did not become less after the shot, then they're probably doing infi ammo.
Never tried it like this but when doing it the right way it should work fine.
Yes, i tryed used OnPlayerWeaponShot and works fine.
Reply

Is this safe to use on a big server?
Reply

Quote:
Originally Posted by Skream
Посмотреть сообщение
Is this safe to use on a big server?
No. Never.
Reply

Quote:
Originally Posted by DeitY
Посмотреть сообщение
No. Never.
I would agree, you can't just take a system like this toss it into your server and expect it to magically work without issues.
Reply

Quote:
Originally Posted by Pottus
Посмотреть сообщение
Look at these code examples for the ridiculousness of some of the design choices.

Код:
if(ac_i < AntiCheatInfo[playerid][acCall][13] + ac_Mtfc[13][0]) ac_FloodDetect(playerid, 13);
                else if(ac_i < AntiCheatInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid, 27);
                else AntiCheatInfo[playerid][acFloodCount][13] = AntiCheatInfo[playerid][acFloodCount][27] = 0;
Код:
                AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acNOPCount][4] = 0;
                AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acSetVehHealth] = health;
                AntiCheatInfo[AntiCheatVehInfo[vehicleid][acDriver]][acGtc][4] = GetTickCount();
I am really left shaking my head at this code as it is completely and utterly absurd.
Maybe it really looks ugly, but it works)
However, I don't think the style of my code is good, but I don't have time to make it better.

Quote:
Originally Posted by PT
Посмотреть сообщение
This I agree with you I hope in futur he start to split his script and use the methods you said.
Someday)


New Version v1.8.5
Fixes:
Fixed some checks for invalid vehicle model

Download: See the first post
Reply

Wtf kick with reason "[Nex-AC] Suspicion on the ID 0. Reason code: 015 (1)"

my code please help ??

public OnPlayerRequestSpawn(playerid)
{
mysql_format(sqldb, query, sizeof(query), "SELECT * FROM accounts WHERE accname = '%e' LIMIT 0,1", GetName(playerid));
mysql_tquery(sqldb, query, "givegun", "i", playerid);
return 1;
}
PUBLIC: givegun(playerid)
{
new rows = mysql_num_rows();
if(rows)
{
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g1"),cache_get_field_content_int(0, "a1"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g2"),cache_get_field_content_int(0, "a2"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g3"),cache_get_field_content_int(0, "a3"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g4"),cache_get_field_content_int(0, "a4"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g5"),cache_get_field_content_int(0, "a5"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g6"),cache_get_field_content_int(0, "a6"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g7"),cache_get_field_content_int(0, "a7"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g8"),cache_get_field_content_int(0, "a8"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g9"),cache_get_field_content_int(0, "a9"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g10"),cache_get_field_content_int(0, "a10"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g11"),cache_get_field_content_int(0, "a11"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g12"),cache_get_field_content_int(0, "a12"));

}
return 1;
}
Please help idon't understandt

if put code :
public OnGameModeInit()
{
EnableAntiCheat(15, 0);
return 1;
}
problem appear with reason "[Nex-AC] Suspicion on the ID 0. Reason code: 016...... wtf i think this ac is .....
Reply

Quote:
Originally Posted by Irenijus
Посмотреть сообщение
Wtf kick with reason "[Nex-AC] Suspicion on the ID 0. Reason code: 015 (1)"

my code please help ??

public OnPlayerRequestSpawn(playerid)
{
mysql_format(sqldb, query, sizeof(query), "SELECT * FROM accounts WHERE accname = '%e' LIMIT 0,1", GetName(playerid));
mysql_tquery(sqldb, query, "givegun", "i", playerid);
return 1;
}
PUBLIC: givegun(playerid)
{
new rows = mysql_num_rows();
if(rows)
{
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g1"),cache_get_field_content_int(0, "a1"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g2"),cache_get_field_content_int(0, "a2"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g3"),cache_get_field_content_int(0, "a3"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g4"),cache_get_field_content_int(0, "a4"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g5"),cache_get_field_content_int(0, "a5"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g6"),cache_get_field_content_int(0, "a6"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g7"),cache_get_field_content_int(0, "a7"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g8"),cache_get_field_content_int(0, "a8"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g9"),cache_get_field_content_int(0, "a9"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g10"),cache_get_field_content_int(0, "a10"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g11"),cache_get_field_content_int(0, "a11"));
GivePlayerWeapon(playerid,cache_get_field_content_ int(0, "g12"),cache_get_field_content_int(0, "a12"));

}
return 1;
}
Please help idon't understandt

if put code :
public OnGameModeInit()
{
EnableAntiCheat(15, 0);
return 1;
}
problem appear with reason "[Nex-AC] Suspicion on the ID 0. Reason code: 016...... wtf i think this ac is .....
You probably need to enable detection on player's connect, and not in gamemodeinit
Reply

Can you show please ??
Reply

I think this a/c is bugged.............
Reply

I have small problem. I include this anti cheat in my gamemode, all is ok, but then i start server GameMode is Unknown. Then i remove include, GameMode is my and all is ok, where can be a problem?

Sorry for my bad english.
Reply

Quote:
Originally Posted by Jacky40
Посмотреть сообщение
I have small problem. I include this anti cheat in my gamemode, all is ok, but then i start server GameMode is Unknown. Then i remove include, GameMode is my and all is ok, where can be a problem?

Sorry for my bad english.
Well, you probably didn't load include's required plugins, try loading streamer, sscanf and whirlpool plugins
Reply

Quote:
Originally Posted by SecretBoss
Посмотреть сообщение
Well, you probably didn't load include's required plugins, try loading streamer, sscanf and whirlpool plugins
It's dont help.. I have all these plugins.
Reply

Quote:
Originally Posted by Jacky40
Посмотреть сообщение
It's dont help.. I have all these plugins.
Strange its working perfectly with that plugins I said above, this anti-cheat is very good but it has a lot false detections
Reply

Need help on this
PHP код:
C:\Users\Equalizer\Desktop\AxSERVER\pawno\include\nex-ac.inc(3978) : error 025: function heading differs from prototype
C
:\Users\Equalizer\Desktop\AxSERVER\pawno\include\nex-ac.inc(3978) : error 029invalid expressionassumed zero
C
:\Users\Equalizer\Desktop\AxSERVER\pawno\include\nex-ac.inc(3978 -- 3980) : error 029invalid expressionassumed zero
C
:\Users\Equalizer\Desktop\AxSERVER\pawno\include\nex-ac.inc(3978 -- 3980) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors
.
[
Finished in 12.7s
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)