Topic: [LIB] Anti-Cheats v0.1.2b
Hi! i'm working in some methods for make the life of the cheater more complicated... can detect players that uses:
- Spin-Bot (Tested with MagicTW & 13x37)
- Aim-Bot (Tested with 13x37)
- Fire-Bot (Need test it)
------------------------- ----------------------- -----
Source Repository: https://gitlab.com/Tardo/TWAntiCheats
==============================[ CHANGELOG ]==============================
+ v0.1.2b
- Fixed issue when detect cheater and not destroy CCharacter
- Added "TWACVersion" function for get library version (twac::Funcs::TWACVersion() in AntiCheats.hpp)
- Refactor some code
+ v0.1.0b
- Added Anti AIM Bot
- Added Anti Auto-Fire Bot
- Added Anti Spin Bot
==============================[ INSTALLATION ]==============================
1. Download Library
2. Move 'twac' to "other/" folder.
3. Edit your bam.lua:
A) Add the line "Import("other/twac/twac.lua")
B) Before "config:Finalize("config.lua") add "config:Add(TWAC.OptFind("TWAntiCheats", true))"
...
config:Add(SDL.OptFind("sdl", true))
config:Add(FreeType.OptFind("freetype", true))
config:Add(TWAC.OptFind("TWAntiCheats", true))
config:Finalize("config.lua")
...
C) Just after "function build(settings)" add the line "config.TWAntiCheats:Apply(settings)"
...
function build(settings)
-- apply twac setting
config.TWAntiCheats:Apply(settings)
...
**Perhaps not the best place...
==============================[ USAGE ]==============================
1. Modify "CCharacter" class:
A) [CCharacter.h] Add "twac::CCharacter"
...
CCharacterCore m_Core
twac::CCharacter m_AntiCheats;
...
** Remember add... "#include <CCharacterAntiCheats.hpp>"
B) [CCharacter.cpp] In "void CCharacter::OnDirectInput(CNetObj_PlayerInput *pNewInput)", before the last line "mem_copy(&m_LatestPrevInput, &m_LatestInput, sizeof(m_LatestInput));" insert:
const int twac = m_AntiCheats.CheckInputs(Server()->Tick(), m_LatestInput, m_LatestPrevInput);
if (twac)
dbg_msg("ANTI-CHEAT", "Detected! %d", twac);
Posible results:
0 - NONE
1 - FIREBOT
2 - SPINBOT
3 - AIMBOT
The process can be improved... this is only a basic guide.