Awesome work man!
Few bugs:
- 39 Anti-Dialog hack is not working when using y_dialogs.
- Anti-Airbreak doesn't seems to work, and reports player after classSelection spawn. Fixed it by checking if player spawned in last second.
- Anti-Weapon hack doesn't work properly. If I give myself a weapon (via GivePlayerWeapon), and change weapon to bare hand, AC thinks I am cheating.
I created enum and wrote script which converted all
Код:
else AntiCheatInfo[playerid][pFloodCount][13] = AntiCheatInfo[playerid][pFloodCount][27] = 0;
nonsense to readable format.
Added enums:
Код:
enum _:ACListOfReasons {
/* 0 */ E_AIRBREAK,
/* 1 */ E_AIRBREAK_IN_VEHICLE,
/* 2 */ E_TELEPORT,
/* 3 */ E_TELEPORT_IN_VEHICLE,
/* 4 */ E_TELEPORT_INTO_VEHICLE,
/* 5 */ E_TELEPORT_VEHICLE,
/* 6 */ E_TELEPORT_PICKUPS,
/* 7 */ E_FLY_HACK,
/* 8 */ E_FLY_HACK_IN_VEHICLE,
/* 9 */ E_SPEED_HACK_ONFOOT,
/* 10 */ E_SPEED_HACK_IN_VEHICLE,
/* 11 */ E_HEALTH_HACK_IN_VEHICLE,
/* 12 */ E_HEALTH_HACK_ONFOOT,
/* 13 */ E_ARMOUR_HACK,
/* 14 */ E_MONEY_HACK,
/* 15 */ E_WEAPON_HACK,
/* 16 */ E_AMMO_HACK_ADD,
/* 17 */ E_AMMO_HACK_INFINITE,
/* 18 */ E_SPECIAL_ACTIONS_HACK,
/* 19 */ E_GODMODE,
/* 20 */ E_GODMODE_IN_VEHICLE,
/* 21 */ E_INVISIBILITY_HACK,
/* 22 */ E_LAGCOMP_SPOOF,
/* 23 */ E_TUNING_HACK,
/* 24 */ E_PARKOUT_HACK,
/* 25 */ E_QUICK_TURN_HACK,
/* 26 */ E_RAPID_FIRE_HACK,
/* 27 */ E_FAKESPAWN,
/* 28 */ E_FAKEKILL,
/* 29 */ E_PRO_AIM,
/* 30 */ E_CJ_RUN,
/* 31 */ E_CARSHOT,
/* 32 */ E_CARJACK_HACK,
/* 33 */ E_UNFREEZE_HACK,
/* 34 */ E_AFK_GHOST,
/* 35 */ E_FULL_AIMING,
/* 36 */ E_FAKE_NPC,
/* 37 */ E_RECONNECT,
/* 38 */ E_HIGH_PING,
/* 39 */ E_DIALOG_HACK,
/* 40 */ E_SANDBOX,
/* 41 */ E_INVALID_VERSION,
/* 42 */ E_RCON_HACK,
/* 43 */ E_TUNING_CRASHER,
/* 44 */ E_INVALID_SEAT_CRASHER,
/* 45 */ E_DIALOG_CRASHER,
/* 46 */ E_ATTACHED_OBJECT_CRASHER,
/* 47 */ E_WEAPON_CRASHER,
/* 48 */ E_FLOOD_PROTECTION,
/* 49 */ E_FLOOD_CALLBACKS,
/* 50 */ E_FLOOD_CHANGE_SEAT,
/* 51 */ E_DDOS,
/* 52 */ E_NOPs
};
enum _:ACListOfCallbacks {
E_OnDialogResponse,
E_OnEnterExitModShop,
E_OnPlayerClickMap,
E_OnPlayerClickPlayer,
E_OnPlayerClickTextDraw,
E_OnPlayerCommandText,
E_OnPlayerEnterVehicle,
E_OnPlayerExitVehicle,
E_OnPlayerPickUpPickup,
E_OnPlayerRequestClass,
E_OnPlayerSelectedMenuRow,
E_OnPlayerStateChange,
E_OnVehicleMod,
E_OnVehiclePaintjob,
E_OnVehicleRespray,
E_OnVehicleDeath,
E_OnPlayerText,
E_OnPlayerEnterCheckpoint,
E_OnPlayerLeaveCheckpoint,
E_OnPlayerRequestSpawn,
E_OnPlayerExitedMenu,
E_OnPlayerEnterRaceCheckpoint,
E_OnPlayerLeaveRaceCheckpoint,
E_OnPlayerClickPlayerTextDraw,
E_OnVehicleDamageStatusUpdate,
E_OnVehicleSirenStateChange,
E_OnPlayerSelectObject,
E_CrossPublic
};
link:
http://pastebin.com/raw.php?i=mjvLqRN2
What I changed:
- Added enum elements instead of just index numbers to main arrays for code readability.
- Changed few ACAllow default values to false.
- Added check in OnFoot-Teleport detection if player was spawned a moment ago.
- Moved translations to the main file (my preference, it's easy to translate few lines by yourself, so why bother with 2 files, since code should be recompiled anyways).
GitHub would be so good to maintain this amount of open source code :/ Please use it...