# SwiftLink

#### "*The backbone of modern surveillance."*

***

### 📖 Overview

**SwiftLink** is a next-generation **traffic enforcement and surveillance management system** built for **FiveM roleplay servers** using **QBCore**.\
\
Developed by **Swift Studios**, it connects **speed detection**, **live CCTV access**, and **automated Discord logging** into one seamless, high-performance network for law enforcement and city authorities.

Designed to emulate a realistic state-wide monitoring infrastructure, SwiftLink brings your server to life with:

* **Automated camera enforcement zones**
* **Dynamic fine calculation and bank deduction**
* **Live-view surveillance computers**
* **Flash feedback for detected vehicles**
* **Integrated BOLO and webhook support**

***

### ⚙️ Core Features

#### 🚦 Real-Time Speed Detection

Each configured zone continuously scans for player vehicles exceeding the posted **speed limit**. Detection occurs only when the player is the **driver**, ensuring fairness and accuracy.

* Supports both **MPH** and **KMH**
* Compatible with any road layout or environment

***

#### 💰 Dynamic Fine System

SwiftLink automatically determines fines based on how much the driver exceeds the speed limit.

* Fully configurable tiers (`Config.SpeedingFines`)
* Bank deductions handled automatically via **QBCore**
* Discord alerts for **failed payments**

***

#### 🚓 Emergency Vehicle Logic

Emergency classes (Police, EMS, Fire) can be optionally exempted from speed enforcement when sirens are active, giving servers full realism and control.

***

#### 🖥️ Police Surveillance Computer

Players can access designated **computer terminals** to view the live CCTV network.

**Features include:**

* Interactive tablet-style NUI interface
* Live rotation and tilt controls
* Instructional UI (on-screen controls overlay)
* Secure access limited to authorized terminals
* Automatically logs officer access via Discord

***

#### 🌐 Discord Integration

SwiftLink comes equipped with **rich Discord webhook logging**, offering visibility into every detection event.

**Logged details:**

* License plate, vehicle model, speed & overage
* Street name and camera ID
* Fine amount and success/failure
* Timestamped embeds with camera identifiers

***

#### ⚡ Visual Flash Effect

When a player triggers a speed camera, a **bright flash** appears on-screen to simulate camera capture — fully toggleable in `config.lua`.

***

#### 🧰 Developer Utilities

Built-in commands make setup fast and intuitive:

| Command                                 | Description                                            |
| --------------------------------------- | ------------------------------------------------------ |
| `*copycamcoords [name] [limit] [width]` | Copies a preformatted camera config line to clipboard. |
| `*togglecamdisplay`                     | Shows or hides map blips for all active camera zones.  |

These tools are perfect for administrators creating or adjusting large camera networks directly in-game.

***

### 🧩 Technical Overview

#### 📦 Dependencies

SwiftLink integrates seamlessly with:

* [**QBCore Framework**](https://docs.qbcore.org/) — Core player & economy systems
* [**ox\_lib**](https://overextended.dev/ox_lib) — Zone handling, notifications, and NUI helpers
