How It Works
The anti-cheat system monitors each player’s aircraft health (life) in real-time. When a player’s health increases without a legitimate repair action, the system flags this as potential cheating.Detection Logic
The health hack detection runs on everyFSNETCMD_AIRPLANESTATE packet:
- Previous health is less than current health (health increased)
- Previous health is not -1 (player has spawned)
- Aircraft was not just repaired (legitimate health increase)
What Happens on Detection
- A warning message is logged to the server console
- A broadcast message is sent to all players on the server
- The player’s IP address is logged for admin review
Configuration
Configure the anti-cheat message inconfig.py:
Example Output
When a health hack is detected, all players will see:Technical Details
The aircraft state tracking updates with every flight data packet, typically multiple times per second. This ensures rapid detection of health anomalies.
State Tracking
The proxy tracks:player.aircraft.prev_life- Previous health valueplayer.aircraft.life- Current health valueplayer.aircraft.just_repaired- Flag set when weapon config changes (repair)
Legitimate Health Increases
The system accounts for legitimate health increases: Weapon Config Changes: When a player repairs/changes loadout, theon_weapon_config hook sets just_repaired = True, preventing false positives.
Logging
Detections are logged with WARNING level:For detailed anti-cheat logging, set
LOGGING_LEVEL = DEBUG in config.py during troubleshooting.Related Features
- The anti-cheat system runs independently of other proxy features
- Works alongside all plugins without interference
- Compatible with ViaVersion and Discord integration