**SpeedLimit**


### Description
SpeedLimit is a new mod that simulates realistic speed enforcement systems, giving players the challenge of following traffic laws within the game. Designed with immersive gameplay in mind, this mod is perfect for driving simulation enthusiasts who crave a more authentic experience in GTA V.

### Features
Realistic Speed Camera Setup:
- Add customizable speed cameras throughout the map to simulate real-world enforcement. - Locations and speed limits can be adjusted via the config.ini file.

Speed Unit Support:
- Choose between km/h and mph to suit your preference.

Dynamic Range Notifications:
- Receive live notifications when entering a speed-enforced zone, showing your current speed and whether you're exceeding the limit.

Tiered Fine System:
- Get penalized based on how much you exceed the speed limit, ranging from minor warnings to heavy fines for reckless driving.

Map Markers:
- All speed cameras are displayed on the in-game map, helping you plan your routes or avoid specific areas.

Auto Reset:
- Once you leave a monitored area, notifications and fines are reset, simulating real-world speed enforcement zones.

Toggle XYZ Coordinates Display:
- Players can toggle the display of their current XYZ coordinates using the CTRL key on your keyboard, allowing them to evaluate and choose the locations for placing speed cameras on the map through config.ini.

### How It Works
The SpeedLimit works by integrating a series of speed monitoring systems into the game, where the mod tracks the player's vehicle speed and compares it against predefined speed limits.

### Installation
1. Download and install [Script Hook V](http://www.dev-c.com/gtav/scripthookv/).
2. Download and install [Script Hook V .NET](https://github.com/crosire/scripthookvdotnet/releases).
3. Place SpeedLimit.dll, SpeedLimit.pdb, and the SpeedLimit folder (which contains the config.ini) to your Scripts folder in the GTA V directory.
4. Launch GTA V and enjoy the mod!

### Usage
Speed Enforcement:
- When you drive near a speed camera, the system will check if you're speeding. If you're over the limit, the system will notify you and apply a fine based on your speed.

Notifications:
- You will receive notifications when you enter a speed camera zone, indicating your current speed and whether you are exceeding the limit.

Fine Calculation:
- Fines are tiered based on how much you exceed the speed limit:

	1. Minor speeding (5-10 km/h over): Warning
	2. Medium speeding (11-20 km/h over): $3000 fine
	3. Major speeding (21-40 km/h over): $3500 fine
	4. Reckless speeding (41-60 km/h over): $5000 fine
	5. Dangerous driving (over 60 km/h): $24000 fine

### Changelog
#### v2.0
- Updated Fine Deduction Mechanism: The system now accumulates fines starting from every Tuesday at 00:00. If a speeding violation occurs, the fine will continuously increase until the next Tuesday when the total amount is deducted.
- Fine Total Display: You can press the NumPad4 key to view the current accumulated fine total, allowing you to see how much you've been fined so far.
- Bug Fixed: Corrected an error in the fine display for Reckless speeding (41-60 km/h over). The issue has been resolved in this version.

#### v1.0
- Initial release

### Credits
Developed by TheChun.

---


**測速照相機**

### 描述
SpeedLimit 是一款模擬現實超速執法系統的模組，為玩家提供遵守交通規則的挑戰。非常適合熱衷於駕駛模擬的玩家，讓你在GTA V中享受更真實的駕駛經歷。

### 功能
真實的速限相機設置：
- 在地圖上添加可自定義的速限相機，模擬現實中的執法系統。
- 相機位置與速限可通過 config.ini 文件進行調整。

速限單位支援：
- 根據個人偏好選擇使用公里/小時（km/h）或英里/小時（mph）。

動態範圍通知：
- 當進入速限監控區域時，將顯示當前速度並告知是否超速。

分級罰款系統：
- 根據超速程度處罰玩家，從輕微警告到嚴重罰款不等，對於魯莽駕駛會有重罰。

地圖標記：
- 所有速限相機會顯示在遊戲內地圖上，幫助玩家規劃路線或避開特定區域。

自動重置：
- 一旦離開監控區域，通知與罰款會重置，模擬現實中的速限執法區域。

開關XYZ座標顯示：
- 玩家可透過鍵盤的 CTRL 按鍵來開關顯示當前玩家的 XYZ 座標，方便玩家評估並選擇適合的位置在地圖上安置測速照相機。

### 運作原理
SpeedLimit 透過整合一系列的速度監控系統，本模組會追蹤玩家車輛的速度，並將其與預先設定的速限進行比較。

### 安裝步驟
1. 下載並安裝 [Script Hook V](http://www.dev-c.com/gtav/scripthookv/)。
2. 下載並安裝 [Script Hook V .NET](https://github.com/crosire/scripthookvdotnet/releases)。
3. 將 `SpeedLimit.dll` 、 `SpeedLimit.pdb` 以及SpeedLimit資料夾(其中包含config.ini)放置在GTA V目錄中的 `scripts` 資料夾內。如果你沒有 `scripts` 資料夾，請自行創建一個。
4. 啟動GTA V

### 使用說明
速限執法：
- 當你駕駛接近速限相機時，系統會檢查是否超速。如果超過速限，系統會通知你並根據超速程度處罰你。

通知：
- 當進入速限監控區域時，會收到通知，顯示當前速度並告知是否超速。

罰款計算：
- 根據超速的程度，罰款分為不同等級：

	1. 輕微超速（超速 5-10 km/h）：警告
	2. 中度超速（超速 11-20 km/h）：罰款 $3000
	3. 嚴重超速（超速 21-40 km/h）：罰款 $3500
	4. 魯莽駕駛（超速 41-60 km/h）：罰款 $5000
	5. 危險駕駛（超速超過 60 km/h）：罰款 $24000

### 更新日誌
#### v2.0
- 更新罰款扣款機制；由每週二的00:00開始累計，若有超速行為發生，罰款將會不斷疊加，直至隔週二統一扣款。
- 可透過NumPad4按鍵打開當前累計罰款總額，讓您更清楚當前被罰了多少錢
- 錯誤修復；魯莽駕駛（超速 41-60 km/h）的罰款顯示錯誤，新版本進行修復

#### v1.0
- 初始版本

### 致謝
由 TheChun 開發。

---