> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rktscripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Logger

> Official documentation for the RKT auditing and security system.

# Introduction

**RKT Logger** is an advanced auditing tool for FiveM that combines detailed event logs with an intelligent integrity monitoring system. It is designed to provide administrators with a clear and indisputable view of all critical actions performed on the server.

<CardGroup cols={2}>
  <Card title="Forensic Auditing" icon="magnifying-glass">
    IP, Location, VPN, and Hardware ID tracking.
  </Card>

  <Card title="Active Monitoring" icon="eye">
    Movement, combat, and event integrity logging.
  </Card>
</CardGroup>

## Quick Start

1. **Download**: Place the `rkt_logger` folder in your server's `resources` directory.
2. **Dependencies**: Requires `ox_lib` for network functions and utilities.
3. **Webhooks**: Configure your auditing channels in `config.lua`.
4. **Initialization**: Add `ensure rkt_logger` to your server configuration file.

***

# Auditing Configuration

The `config.lua` file allows you to define which actions should be logged and where reports should be sent.

### Report Webhooks

```lua theme={null}
Config.Webhook = {
    Enabled = true,
    URLs = {
        Anticheat    = "WEBHOOK_FOR_CRITICAL_ALERTS",
        Connections  = "WEBHOOK_FOR_CONNECTIONS",
        Deaths       = "WEBHOOK_FOR_DEATHS",
        Evidence     = "WEBHOOK_FOR_EVIDENCE_SCREENSHOTS",
    }
}
```

***

# Monitoring Modules

The system audits various behaviors to ensure compliance with server rules.

### Movement Auditing

<CardGroup cols={3}>
  <Card title="Coordinate Deviations" icon="route" />

  <Card title="Atypical Speeds" icon="gauge-high" />

  <Card title="Vertical Jumps" icon="up-long" />
</CardGroup>

### Event & Entity Integrity

* **Spawn Flow**: Monitors massive entity creation to prevent server lag.
* **Explosion Auditing**: Logs and prevents the use of unauthorized explosions.
* **Token Security**: Source validation for all critical client-triggered events.

***

# Integration (Bridge)

The `server/bridge.lua` file is the connection point with your framework.

| Function                       | Purpose                                       |
| :----------------------------- | :-------------------------------------------- |
| `Bridge.GetIdentifier(source)` | Retrieves the player's license or CitizenID.  |
| `Bridge.IsStaff(source)`       | Checks permissions to bypass specific audits. |
| `Bridge.GetPlayerName(source)` | Returns the character's registered name.      |

***

# Evidence Capture (Screenshots)

For critical incidents, the logger uses `screenshot-basic` to attach visual proof to the report.

<Info>
  Captures are automatically sent to the webhook defined in `Evidence`,
  facilitating analysis by the staff team.
</Info>
