How mtfo-org/mtfo works
MTFO is an LSPDFR plugin that changes GTA V traffic behavior around an emergency response. On duty, it loads settings and starts a controller; while the player drives with lights and siren active, the controller coordinates vehicle yielding, intersection clearing and signal control, and oncoming braking. A separate around-player feature helps traffic pass a stationary or slow player. Road-position analysis supports lane-aware decisions, while shared plugin state tracks active tasks. The excerpts show core handlers and state, but not all controller branches or configuration fields, so uncertain internal links are omitted.
Main entry points: TrafficYieldController.cs Yield controller · AroundPlayerHandler.cs Around-player overtaking · Misc.cs Plugin task state · EntryPoint.cs Plugin entry
Components 12
Plugin lifecycle
- Plugin entry
EntryPoint.cs - Settings
Utility/Misc.cs
Response coordination
- Yield controller
TrafficYieldController.cs
Traffic behavior
- Intersection control
Handlers/IntersectionHandler.cs - Oncoming braking
Handlers/OncomingTrafficHandler.cs - Lane yielding
Handlers/YieldTasker.cs - Around-player overtaking
Handlers/AroundPlayerHandler.cs
Road analysis and state
- Road position
Utility/RoadPosition.cs - Plugin task state
Utility/Misc.cs
Other components
- Emergency responder
- GTA V world
- LSPDFR
Connections 21
- LSPDFR → Plugin entry: duty events
- Plugin entry → Settings: loads on duty
- Plugin entry → Yield controller: starts / stops
- Emergency responder → GTA V world: drives with siren
- Yield controller → GTA V world: reads vehicle state
- Yield controller → Settings: reads options
- Yield controller → Intersection control: dispatches
- Yield controller → Oncoming braking: dispatches
- Yield controller → Lane yielding: manages tasks
- Yield controller → Around-player overtaking: coordinates logic
- Intersection control → GTA V world: tasks traffic / lights
- Oncoming braking → GTA V world: brakes vehicles
- Lane yielding → GTA V world: directs yielding
- Around-player overtaking → GTA V world: routes around player
- Yield controller → Road position: processes road position
- Lane yielding → Road position: calculates lanes
- Around-player overtaking → Road position: calculates lanes
- Yield controller → Plugin task state: tracks active tasks
- Intersection control → Plugin task state: tracks tasked vehicles
- Oncoming braking → Plugin task state: tracks braking vehicles
- Around-player overtaking → Plugin task state: tracks overtake tasks