# LiveScanner

A RagePluginHook plugin for GTA V that streams live police radio from Broadcastify through your patrol vehicle's speaker.

## Features

- Streams real police scanner audio from any Broadcastify feed
- Spatial audio: full volume inside your vehicle, fades as you walk away
- Door-aware: audio gets louder when a vehicle door is open
- Stereo panning based on your camera angle relative to the vehicle
- Toggle on/off with a hotkey (default F1)
- Auto-reconnects on stream interruption (up to 5 attempts)
- Activates automatically when you go on duty, stops when you go off duty

## Requirements

- Grand Theft Auto V
- RagePluginHook (RPH)
- LSPDFR

## Installation

1. Extract the zip into your GTA V folder (e.g. `Grand Theft Auto V\`). This places `LiveScanner.dll` in `plugins\` and the NAudio DLLs in the game root.
2. Launch GTA V through RagePluginHook.

A default `LiveScanner.ini` will be created in `plugins` on first run if one doesn't exist.

## Configuration

Edit `LiveScanner.ini` in your `plugins` folder:

[Stream]
; Broadcastify direct stream URL
Url=https://broadcastify.cdnstream1.com/24051

[Audio]
; Master volume 0.0 to 1.0
MaxVolume=0.5
; Distance (meters) from vehicle where volume stays at 100%
FullVolumeRadius=3
; Distance (meters) where radio goes completely silent
SilentRadius=25

[Keys]
; Toggle radio on/off
ToggleKey=F1

To find your local Broadcastify stream URL: open the feed page in Chrome, press F12, go to the Network tab, click play on the feed, and look for the audio stream URL.

## Usage

Go on duty through LSPDFR. The scanner starts automatically. Press **F1** to toggle the radio on or off. Get into any emergency vehicle (class 18) to set it as your radio source — the audio will follow that vehicle even after you exit.

## Author

Gamecock Tomahawk
