samp.directory
← Scripts y librerías

DrgxByteZone/drgxel-ac

Sin descripción en GitHub.

Librería★ 1actualizado ago 2026Sin licenciaPawnsampctl
Abrir en GitHub

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 IssuesDRGXEL-AC Engine 2.0Performance Impact
Hundreds of SetTimerEx instances (1 timer per connected player)1 Central Master Heartbeat SchedulerSaves ~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 & TrigonometryFast Squared Vector Math (DRGXEL_DIST3D_SQ)4-5x faster arithmetic at CPU bytecode level
False-kicks during lag spikesAdaptive Network & Ping ScalingAutomatic tolerance expansion during latency jitter
False-kicks on spawn / interior doors4-Layer Immunity Shields100% false-positive immunity on spawn & transitions

🛡️ Protection Matrix (20 Core Detections)

🏃 Movement & Position

CodeDetection NameDescription
#000Anti-AirBreak (Onfoot)Catches unnatural steady positional shifts with near-zero physics velocity.
#001Anti-AirBreak (Vehicle)Catches vehicles moving without corresponding physics engine velocity vectors.
#002Anti-Teleport (Onfoot)Blocks instant distance jumps (> 80m) not triggered by server SetPlayerPos.
#003Anti-Teleport (Vehicle)Blocks instant vehicle coordinate jumps (> 140m) without server position commands.
#007Anti-FlyHack (Onfoot)Detects abnormal vertical Z-acceleration and airborne animation exploitation without parachute.
#008Anti-FlyHack (Vehicle)Detects vehicles sustaining upward vertical momentum without ramps or aircraft models.
#009Anti-SpeedHack (Onfoot)Enforces sprint and travel velocity caps against onfoot speed limits.
#010Anti-SpeedHack (Vehicle)Compares live travel speed against maximum vehicle model capabilities.
#030Anti-CJ RunBlocks fast CJ sprint animations (1231, 1246) on non-CJ skins.
#033Anti-UnFreeze / Anti-StunDetects movement and shooting while frozen by TogglePlayerControllable.

⚔️ Combat & Health

CodeDetection NameDescription
#012Anti-Health HackShadow State Sync: Catches unauthorized memory injection of player health.
#013Anti-Armour HackBlocks client-side armour restoration without server transaction events.
#015Anti-Weapon HackValidates inventory across all 13 slots; blocks spawning unauthorized weapons.
#016Anti-Infinite AmmoEvent-driven ammo decrement validation in OnPlayerWeaponShot.
#019Anti-GodMode (Bullet)Verifies health/armour reduction upon incoming damage in OnPlayerTakeDamage.
#022Anti-Rapid FireEnforces weapon-specific minimum firing interval cooldowns (g_dacMinShotInterval).

🚗 Vehicles & Modifications

CodeDetection NameDescription
#004Anti-CarJack / HijackPrevents instant teleportation into driver seats occupied by other players.
#011Anti-Vehicle Health HackCatches vehicle health increases without Pay 'n' Spray or server repair calls.
#020Anti-Vehicle GodModeVerifies vehicle damage resistance when receiving impacts or bullets.
#023Anti-Tuning HackBlocks vehicle modding outside authorized ModShops.
#025Anti-CarShot / Quick TurnCatches instantaneous 180° vehicle direction reversals at high speeds (spinbot).
#043Anti-Illegal ComponentsValidates component compatibility per vehicle model (blocks invalid nitro/spoilers).

🔒 Network & Server Security

CodeDetection NameDescription
#014Anti-Money HackServer-authoritative economy tracking with automatic reversal of injected cash.
#018Anti-Jetpack HackDetects unauthorized Jetpack spawning and illegal special action switching.
#024Anti-Invisible HackBlocks spectator state exploitation used to turn invisible to other players.
#027Anti-FakeSpawnEnforces valid spawn lifecycle verification before OnPlayerSpawn.
#028Anti-FakeKillValidates death packet integrity and prevents killfeed spamming.
#038Anti-High Ping / FloodFilters extreme latency spikes and connection packet spamming.
#042Anti-RCON Brute ForceRate limits and bans IPs attempting brute force RCON logins.
#052Anti-NOP ProtectionDetects client dropping server RPCs (SetPlayerPos, SetPlayerHealth, etc.).
#047Anti-Callback FloodSliding-window rate limiter on text, dialogs, checkpoints, and commands.

🚀 Installation

1. Manual Installation

  1. Download the repository.
  2. Copy src/drgxel-ac.inc, src/drgxel-ac_opt.inc, and language files to your server's pawno/include/ directory.
  3. Include it in your gamemode or filterscripts:
    #include <drgxel-ac>
    
  4. 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