TRAFFIC LIGHT CONTROLLER BETA v0.1
==================================

Traffic Light Cotroller is a ScriptHookV plugin that gives emergency vehicles green lights. Turn on your sirens, approach a junction, and traffic lights will automatically switch to green for your direction.


INSTALLATION
------------

1. Install ScriptHookV from http://www.dev-c.com/gtav/scripthookv/
2. Drop TrafficLightController.asi into your GTA V folder


USAGE
-----

Just drive any emergency vehicle with sirens on. When you approach a traffic light junction, it turns green. Other directions stay red until you pass through.

Debug Mode:
Type "tlcdebug" as a cheat code to toggle debug visualization:
  - Green sphere = detected entrance
  - Cyan sphere = predicted exit
  - Magenta lines = entrance direction vectors


HOW IT WORKS
------------

The plugin uses pattern scanning to use the game's junction system (CJunctions). When sirens are active, it:

1. Finds nearby junctions using CJunction::GetJunctionAtPositionForTrafficLight
2. Detects which entrance you're approaching based on position + velocity
3. Sets CJunction::m_iLightPhase to your entrance's phase
4. Holds m_fLightTimeRemaining at 10s until you pass


LIMITATIONS
-----------

- Single player only (ScriptHookV)
- Only affects junctions with actual traffic Lights
- AI driving emergency vehicles does not affect the Traffic Light Controller System (yet)


CREDITS
-------

- ScriptHookV by Alexander Blade (http://www.dev-c.com/gtav/scripthookv/)
