# EntityReplacer

A RagePluginHook plugin for GTA V that replaces glitched vehicles or peds with clean clones.

## Features

- Replace the nearest emergency vehicle with a clean clone (preserves livery, extras, plate, health, dirt, emergency lights, and occupants)
- Replace the nearest ped with a clean clone (preserves model, outfit, props, health, armor, weapons, relationship group, and vehicle seat)
- Replaced emergency vehicles spawn with lights on and siren sound off
- Dead peds are restored as dead with their appearance intact

## Requirements

- Grand Theft Auto V
- RagePluginHook (RPH)

## Installation

1. Copy `EntityReplacer.dll` and `EntityReplacer.ini` into your GTA V `plugins` folder (e.g. `Grand Theft Auto V\plugins\`).
2. Launch GTA V through RagePluginHook.

## Configuration

Edit `EntityReplacer.ini` in your `plugins` folder to change the hotkeys:

[Settings]
ReplaceVehicleKey=O
ReplaceVehicleModifier=RShiftKey
ReplacePedKey=P
ReplacePedModifier=RShiftKey

Use any .NET Keys enum name. Set a modifier to None for no modifier.

## Usage

- **RShift+O** (default) — Replace the nearest emergency vehicle (within 8m) with a clean clone
- **RShift+P** (default) — Replace the nearest ped (within 8m) with a clean clone

## Known Issues

When replacing a glitched ELS vehicle, backup officers lose all attachment to that vehicle. They won't return to it or drive it away on their own. Download YouDriveThatCar (also by Gamecock Tomahawk) to force them to take the replacement vehicle away upon releasing them.

## Author

Gamecock Tomahawk
