Este repositorio no tiene archivo de licencia. Se puede leer, pero eso por sí solo no da permiso para reutilizarlo.
Instalar con sampctl
sampctl package install DrgxByteZone/drgxel-ac
Ejecútalo en la carpeta de tu proyecto. sampctl descarga el paquete y sus dependencias.
README.md
DRGXEL-AC
DRGXEL-AC is an ultra-optimized, server-authoritative anti-cheat system built for SA-MP (San Andreas Multiplayer) and open.mp. Designed from the ground up to solve the infamous CPU overhead problem of legacy anti-cheats (reducing CPU load from 40%+ down to < 3-5%), DRGXEL-AC combines high-efficiency detection algorithms with zero-overhead scheduling.
⚡ Performance Architecture
| Legacy Anti-Cheat Issues | DRGXEL-AC Engine 2.0 | Performance Impact |
|---|---|---|
Hundreds of SetTimerEx instances (1 timer per connected player) | 1 Central Master Heartbeat Scheduler | Saves ~95% timer context switches in Pawn VM |
Heavy math in OnPlayerUpdate (50+ calls/sec/player) | Smart Micro-Throttling Engine (40ms) | Cuts redundant native boundary transitions by ~80% |
Continuous floatsqroot & Trigonometry | Fast Squared Vector Math (DRGXEL_DIST3D_SQ) | 4-5x faster arithmetic at CPU bytecode level |
| False-kicks during lag spikes | Adaptive Network & Ping Scaling | Automatic tolerance expansion during latency jitter |
| False-kicks on spawn / interior doors | 4-Layer Immunity Shields | 100% false-positive immunity on spawn & transitions |
🛡️ Protection Matrix (20 Core Detections)
🏃 Movement & Position
| Code | Detection Name | Description |
|---|---|---|
#000 | Anti-AirBreak (Onfoot) | Catches unnatural steady positional shifts with near-zero physics velocity. |
#001 | Anti-AirBreak (Vehicle) | Catches vehicles moving without corresponding physics engine velocity vectors. |
#002 | Anti-Teleport (Onfoot) | Blocks instant distance jumps (> 80m) not triggered by server SetPlayerPos. |
#003 | Anti-Teleport (Vehicle) | Blocks instant vehicle coordinate jumps (> 140m) without server position commands. |
#007 | Anti-FlyHack (Onfoot) | Detects abnormal vertical Z-acceleration and airborne animation exploitation without parachute. |
#008 | Anti-FlyHack (Vehicle) | Detects vehicles sustaining upward vertical momentum without ramps or aircraft models. |
#009 | Anti-SpeedHack (Onfoot) | Enforces sprint and travel velocity caps against onfoot speed limits. |
#010 | Anti-SpeedHack (Vehicle) | Compares live travel speed against maximum vehicle model capabilities. |
#030 | Anti-CJ Run | Blocks fast CJ sprint animations (1231, 1246) on non-CJ skins. |
#033 | Anti-UnFreeze / Anti-Stun | Detects movement and shooting while frozen by TogglePlayerControllable. |
⚔️ Combat & Health
| Code | Detection Name | Description |
|---|---|---|
#012 | Anti-Health Hack | Shadow State Sync: Catches unauthorized memory injection of player health. |
#013 | Anti-Armour Hack | Blocks client-side armour restoration without server transaction events. |
#015 | Anti-Weapon Hack | Validates inventory across all 13 slots; blocks spawning unauthorized weapons. |
#016 | Anti-Infinite Ammo | Event-driven ammo decrement validation in OnPlayerWeaponShot. |
#019 | Anti-GodMode (Bullet) | Verifies health/armour reduction upon incoming damage in OnPlayerTakeDamage. |
#022 | Anti-Rapid Fire | Enforces weapon-specific minimum firing interval cooldowns (g_dacMinShotInterval). |
🚗 Vehicles & Modifications
| Code | Detection Name | Description |
|---|---|---|
#004 | Anti-CarJack / Hijack | Prevents instant teleportation into driver seats occupied by other players. |
#011 | Anti-Vehicle Health Hack | Catches vehicle health increases without Pay 'n' Spray or server repair calls. |
#020 | Anti-Vehicle GodMode | Verifies vehicle damage resistance when receiving impacts or bullets. |
#023 | Anti-Tuning Hack | Blocks vehicle modding outside authorized ModShops. |
#025 | Anti-CarShot / Quick Turn | Catches instantaneous 180° vehicle direction reversals at high speeds (spinbot). |
#043 | Anti-Illegal Components | Validates component compatibility per vehicle model (blocks invalid nitro/spoilers). |
🔒 Network & Server Security
| Code | Detection Name | Description |
|---|---|---|
#014 | Anti-Money Hack | Server-authoritative economy tracking with automatic reversal of injected cash. |
#018 | Anti-Jetpack Hack | Detects unauthorized Jetpack spawning and illegal special action switching. |
#024 | Anti-Invisible Hack | Blocks spectator state exploitation used to turn invisible to other players. |
#027 | Anti-FakeSpawn | Enforces valid spawn lifecycle verification before OnPlayerSpawn. |
#028 | Anti-FakeKill | Validates death packet integrity and prevents killfeed spamming. |
#038 | Anti-High Ping / Flood | Filters extreme latency spikes and connection packet spamming. |
#042 | Anti-RCON Brute Force | Rate limits and bans IPs attempting brute force RCON logins. |
#052 | Anti-NOP Protection | Detects client dropping server RPCs (SetPlayerPos, SetPlayerHealth, etc.). |
#047 | Anti-Callback Flood | Sliding-window rate limiter on text, dialogs, checkpoints, and commands. |
🚀 Installation
1. Manual Installation
- Download the repository.
- Copy
src/drgxel-ac.inc,src/drgxel-ac_opt.inc, and language files to your server'spawno/include/directory. - Include it in your gamemode or filterscripts:
#include <drgxel-ac> - Recompile your gamemode.
2. sampctl Installation
Add to your pawn.json:
{
"dependencies": [
"DrgxByteZone/drgxel-ac"
]
}
⚙️ Configuration
Pre-compiler Definitions
You can override performance settings before including the library:
#define DRGXEL_AC_TICK_THROTTLE_MS 40 // Dynamic micro-throttle interval (ms)
#define DRGXEL_AC_USE_FAST_MATH 1 // 1 = Enable fast squared distance math
#define DRGXEL_AC_USE_CENTRAL_TIMER 1 // 1 = Central master timer, 0 = Per-player timers
#define DRGXEL_AC_MAX_PING 500 // Maximum ping threshold
#define DRGXEL_AC_MAX_CONNECTS_FROM_IP 3 // Maximum connections per IP
#include <drgxel-ac>
Configuration File (drgxel-ac_settings.cfg)
Place drgxel-ac_settings.cfg in your server's root or scriptfiles/ directory to manage toggles at runtime.
📖 Developer API & Callbacks
Callbacks
// Called when a cheat violation is confirmed
public OnCheatDetected(playerid, const ip_address[], type, code)
{
printf("[DRGXEL-AC] Player %d (%s) triggered anti-cheat code #%03d", playerid, ip_address, code);
return 1;
}
// Called on warning thresholds before kick
public OnCheatWarning(playerid, const ip_address[], type, code, code2, count)
{
// Custom warning/logging logic
return 1;
}
// Called on NOP detection
public OnNOPWarning(playerid, nopid, count)
{
return 1;
}
Functions
EnableAntiCheat(code, bool:enable); // Toggle specific detection globally
EnableAntiCheatForPlayer(playerid, code, bool:enable); // Toggle detection for specific player
IsAntiCheatEnabled(code); // Check global detection state
IsAntiCheatEnabledForPlayer(playerid, code); // Check player detection state
AntiCheatGetHealth(playerid, &Float:health); // Get authoritative health
AntiCheatGetArmour(playerid, &Float:armour); // Get authoritative armour
AntiCheatGetPos(playerid, &Float:x, &Float:y, &Float:z);// Get authoritative position
AntiCheatGetSpeed(playerid); // Get authoritative speed
AntiCheatGetWeapon(playerid); // Get active held weapon ID
AntiCheatIsConnected(playerid); // Check connection state
// Performance Monitoring APIs
new total = drgxel_ac_GetTotalChecks();
new throttled = drgxel_ac_GetThrottledFrames();
new lastDuration = drgxel_ac_GetLastTickDuration();
📄 License
This project is licensed under the MIT License.
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