XenoX352/anticheat-hytam-legam
This anti cheat only supports open.mp, it is made for everyone and is free.
README.md
Hytam Legam Anti-Cheat
A comprehensive, open-source anti-cheat system designed for SA-MP and open.mp servers. Built with performance and precision in mind using modern libraries and packet analysis.
Features
-
Player Integrity
Speed hack, teleport, CJ run, airbreak (onfoot & vehicle), godmode, health/armour/ammo manipulation, invisibility, fake spawn, fake kill, animation sync data abuse. -
Weapon & Combat
Invalid weapons, rapid fire, aimlock detection (angle snap + distance snap). -
Server & Network
NoPS (packet flood), crash attempt (invalid RPC), chat spam. -
Vehicle Exploits
Vehicle health hack, instant repair, airbreak while driving, /mcar (vehicle damage without collision). -
Stealer/Mod Loader Detection
Moonloader and Monetloader blocking on connect. -
Mapping & TextDraw Stealer
Object spam detection to prevent mass mapping rip. -
Webhook Integration
Sends cheat detection alerts directly to a Discord channel via webhook. -
Admin Control Panel
/acsettingslegamdialog to toggle each detection module on or off in real-time. -
Extensible
Easily add new cheat checks by hooking into the existing framework.
Dependencies
| Plugin / Include | Purpose |
|---|---|
| open.mp | Server core |
| PawnPlus | Dynamic values, JSON creation |
| YSI (y_hooks, y_commands) | Hook system, command processing |
| Pawn.RakNet | Low-level packet interception |
| vehicle-streamer | Vehicle streamer (by ahmedamyr) |
| pawn-requests | HTTP/JSON webhook calls |
All dependencies are free and widely used in the SA-MP/open.mp community.
Installation
-
Download or clone this repository into your
pawno/includefolder. -
Ensure all required plugins and includes are loaded in your
server.cfg:- Add
#include <anticheat_hytam_legam>to your gamemode or filterscript.
- Add
-
Set your Discord webhook URL in the script (define
AC_WEBHOOK_URL). -
Compile and run.
No additional database configuration is required; all detection data is stored per-player in memory.
Configuration
Edit the following defines at the top of the include to match your server’s needs:
| Define | Default | Description |
|---|---|---|
AC_MAX_HEALTH | 100.0 | Maximum valid health value |
AC_MAX_ARMOUR | 100.0 | Maximum valid armour |
AC_MAX_VEHICLE_HEALTH | 1000.0 | Maximum vehicle health |
AC_MAX_MONEY | 999999999 | Allowed money limit (prevents money hacks) |
AC_MAX_PING | 500 | Maximum ping before kick |
AC_SPRINT_SPEED | 45.0 | Maximum onfoot speed (m/s) |
AC_VEHICLE_SPEED | 300.0 | Maximum vehicle speed (m/s) |
AC_AIMLOCK_DISTANCE | 150.0 | Max snap distance for aimbot |
AC_AIMLOCK_ANGLE | 10.0 | Max angle difference for aim snap |
AC_NOPS_THRESHOLD | 50 | Packets per second before NoPS flag |
AC_MAX_PLAYER_OBJECTS | 2000 | Max allowed player objects |
AC_WEBHOOK_URL | (your url) | Discord webhook for alerts |
You can toggle any check at runtime via the admin dialog, and changes are applied instantly without a server restart.
Usage
Admin Command
/acsettingslegam- Opens a list dialog to enable/disable each cheat module.
Only available to RCON admins.
Automatic Detection
All checks run automatically each OnPlayerUpdate, OnPlayerWeaponShot, OnPlayerDeath, and relevant packet hooks. When a cheat is detected:
- The player receives a warning.
- After
AC_MAX_WARNINGS(default 5) warnings, the player is kicked. - Severe cheats (teleport, airbreak, etc.) result in an immediate ban.
A detailed log is written to anticheat.log and sent to Discord.
Detection Modules
| # | Module Name | Description |
|---|---|---|
| 0 | Speed Hack | Over-limit movement speed |
| 1 | Teleport Hack | Large position changes without valid vehicle/state |
| 2 | Weapon Hack | Invalid or modded weapons |
| 3 | Ammo Hack | Excessive ammo (except minigun) |
| 4 | Health Hack | Sudden health increase |
| 5 | God Mode | No health reduction after damage |
| 6 | Aim Lock | Auto-aim snapping to targets |
| 7 | Packet Flood (NoPS) | Too many network packets per second |
| 8 | Crash Attempt | Malformed RPC to crash the server |
| 9 | Airbreak (Onfoot) | Floating/moving through air on foot |
| 10 | Airbreak (Vehicle) | Flying with vehicles |
| 11 | Chat Spam | Rapid message flooding |
| 12 | Vehicle Damage Hack | Damaging vehicle without collision |
| 13 | CJ Run | Speed hack with CJ run animation |
| 14 | Rapid Fire | Faster than weapon fire rate |
| 15 | Mapping Stealer | Spawning too many objects quickly |
| 16 | Invisibility | Being invisible without proper state |
| 17 | Fake Kill | Killing from impossible distances |
| 18 | Fake Spawn | Dying without a valid spawn |
| 19 | Sync Data Hack | Invalid animation changes |
| 20 | Moonloader Blocker | Blocks Moonloader users |
| 21 | Monetloader Blocker | Blocks Monetloader users |
| 22 | Wallhack | (Future: visual-based detection) |
| 23 | Pickup Hack | (Future) |
| 24 | Tuning Hack | (Future) |
Customization
To add a new cheat check:
- Add a new constant in the
enumlist (e.g.,AC_CHECK_CUSTOM). - Add its name to
g_acCheckNames. - Place the detection logic inside the appropriate hook (e.g.,
hook OnPlayerUpdate). - Call
AC_OnCheatDetected(playerid, AC_CHECK_CUSTOM, "details")when triggered. - The admin dialog and toggle system will automatically include your new module.
Logging & Discord Alerts
The system writes every detection to anticheat.log with timestamps. Additionally, a JSON payload is sent to the configured Discord webhook, allowing real-time monitoring by admins.
Example Discord message:
License
This anti-cheat is open source and available under the MIT License. You are free to use, modify, and distribute it in your own projects, commercial or otherwise. See the LICENSE file for more details.
Credits
- Developed by the Hytam Legam team.
- Uses: open.mp, PawnPlus, YSI, Pawn.RakNet, pawn-requests, vehicle-streamer.
Contributions, issues, and pull requests are welcome!
Esta página se genera con lo que GitHub publica sobre el repositorio. samp.directory no aloja el código. Informar de un problema con esta ficha