MT‑Nebula Aegis Anti‑Cheat — README
================================================
What this system is
-------------------
This resource is a hardened anti‑cheat for Multi Theft Auto: San Andreas (MTA:SA). It deploys both client‑ and server‑side guards to detect and deter common cheats and tampering. It batches evidence to logs, can escalate punishments, and (optionally) integrates with Discord for logging / gating.

Key capabilities (high‑level)
-----------------------------
- Client guard loads early and phones home to verify integrity.
- Detection modules (non‑exhaustive, names reflect the code structure): aimbot, wallhack, macro/rapid‑fire, noclip/teleport, speed/health edits, explosion abuse, debugscript abuse, hook/tamper scans.
- Honeypots for forbidden commands/events to catch cheat scripts.
- Anti‑bypass & gatekeeping: snapshot/whitelist of expected scripts; optional resource whitelist enforcement.
- Evidence pipeline with rate‑limits and a cooldown/backoff system that throttles noisy incidents.
- Staff account protection via serial‑binding and an audit trail for sensitive staff logins.

Installation
------------
1) Place the resource folder in your server's `resources/` and add to `mtaserver.conf` as usual.

2) What permissions does it need? (ACL)
-----------------------------------
Create or update an ACL group (e.g. `anti-cheat`) and add the resource object for THIS resource, e.g.:
  object name: `resource.<your_resource_name>`
Then grant the minimal rights the scripts actually use:

3)Function rights:
  - function.kickPlayer
  - function.banPlayer
  - function.addBan
  - function.startResource
  - function.restartResource
  - function.stopResource (optional; currently safety‑stubbed in some paths)
  - function.fetchRemote (for Discord webhook/bot calls)
  - function.fileCreate / function.fileOpen / function.fileWrite / function.fileClose / function.fileDelete   <-----These are not strictly necessary.
  - function.xmlLoadFile / function.xmlSaveFile
  - function.outputChatBox (for admin/user feedback)
  - function.setAccountData / function.getAccountData (for staff serial binding)

4)Command rights (so only staff can run these):
  - command. ac_status
  - command. ac_unban_here
  - command. ac_snapshot
  - command. ac_forget_snapshot
  - command. ac_reverify
  - command. ac_verbose
  - command. ac_cooldown
  - command. ac_aimpeek
  - command. slowmode

5)What commands do staff users get?
-------------------------------
Console or users in the Admin group (and, if you choose, Moderator via your ACL) can run:
  /ac_status            → Print current gate status (ban flag, expected snapshot count, base path)
  /ac_unban_here        → Clear local anti‑cheat ‘gate’ ban for this server key
  /ac_snapshot          → Snapshot current expected scripts (refreshes the integrity baseline)
  /ac_forget_snapshot   → Remove the saved snapshot; it will be recreated on next start
  /ac_reverify          → Immediately re‑run the client integrity challenge for a player
  /ac_verbose on|off    → Toggle verbose scan logging for integrity checks
  /ac_cooldown          → Show current adaptive cooldown/backoff state
  /ac_aimpeek <name>    → Inspect recent aim statistics for a specific player
  /slowmode <seconds>   → Enable or disable chat slow‑mode (0 disables)

Note: Some commands are implemented without a hardcoded ACL check in their handler. MTA enforces command ACLs via `command.<name>` rights, so make sure those command rights are granted only to your staff groups.

6)Recommended ACL layout (example)
-------------------------------
       <group name="Admin">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="resource.admin"></object>
        <object name="resource.webadmin"></object>
        <object name="resource.acpanel"></object>
   --- <object name="resource.anticheat"></object>   <--- This is very important.Without this the (anti-cheat system) will not work.
        <object name="user.2TAKE1"></object>
    </group>
    <group name="Console">
        <acl name="Moderator"></acl>
        <acl name="SuperModerator"></acl>
        <acl name="Admin"></acl>
        <acl name="RPC"></acl>
        <object name="user.Console"></object>
    </group>
    <group name="RPC">
        <acl name="RPC"></acl>
        <object name="resource.ip2c"></object>
    </group>
    <group name="MapEditor">
        <acl name="Default"></acl>
        <acl name="MapEditor"></acl>
        <object name="resource.editor_main"></object>
        <object name="resource.edf"></object>
    </group>
    <group name="raceACLGroup">
        <acl name="Default"></acl>
        <acl name="raceACL"></acl>
        <object name="resource.race"></object>
    </group>
    <group name="DevGroup">
        <acl name="DevACL"></acl>
    </group>
    <group name="autoGroup_runcode">
        <acl name="autoACL_runcode"></acl>
        <object name="resource.runcode"></object>
    </group>
    <group name="autoGroup_house">
        <acl name="autoACL_house"></acl>
        <object name="resource.house"></object>
        <object name="user.2TAKE1"></object>
    </group>
    <group name="VIP">
        <object name="user.2TAKE1"></object>
    </group>
    <group name="autoGroup_sistema-home">
        <acl name="autoACL_sistema-home"></acl>
        <object name="resource.sistema-home"></object>
        <object name="user.1234"></object>
    </group>
    <group name="autoGroup_mstu">
        <acl name="autoACL_mstu"></acl>
        <object name="resource.mstu"></object>
    </group>
    <group name="resources.group"></group>
    <group name="Dashboard">
        <object name="user.2TAKE1"></object>
    </group>
    <group name="Serial">
        <object name="user.2TAKE1"></object>
    </group>

7)Acl Groups #1 Moderators -- Dashboard <--- Key F10 < > #2 Addmins And Moderators Accounts Protection --Serial <--- This acl group provides maximum security for staff accounts 

Finally, ensure your Admin/Moderator groups have the `command.*` rights you want them to use.

Logging & audit
---------------
- General AC events: `logs/anticheat.log` (batched).
- Tamper / explosion / speed‑hack and other modules have their own logs under `logs/`.
- Staff audit trail: `logs/admin_audit.log` for serial‑guard events.


See You Soon Next Update --> Join Doscord Group Premium system --> And free system Weekend updates----> https://discord.gg/JsBWZR36
