20.08.2015, 17:17
All decision should pass by an callback an we choose what we want to make
Add an callback for that is my sugestion.
Add an callback for that is my sugestion.
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. |
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();
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. |
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(); |
This I agree with you I hope in futur he start to split his script and use the methods you said.
|
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 ..... |
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 029: invalid expression, assumed zero
C:\Users\Equalizer\Desktop\AxSERVER\pawno\include\nex-ac.inc(3978 -- 3980) : error 029: invalid expression, assumed zero
C:\Users\Equalizer\Desktop\AxSERVER\pawno\include\nex-ac.inc(3978 -- 3980) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
[Finished in 12.7s]