# DespawnUndoer

A RagePluginHook plugin for GTA V that monitors persistent entities and lets you restore them with a hotkey after they despawn.

## Features

- Automatically tracks all persistent peds and vehicles in the world
- Captures snapshots of entity state (appearance, weapons, colors, health, etc.)
- Press a hotkey combo (default LCtrl+D) to restore despawned entities within 20m
- Re-drops weapons for dead peds whose weapon pickups have disappeared
- Snapshots expire after 5 minutes
- Configurable hotkey via INI file

## Requirements

- Grand Theft Auto V
- RagePluginHook (RPH)

## Installation

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

## Configuration

Edit `DespawnUndoer.ini` in your `plugins` folder to change the hotkey:

```ini
[Settings]
RestoreKey=D
RestoreModifier=LControlKey
```

Use any .NET `Keys` enum name. Common modifiers: `LControlKey`, `LShiftKey`, `RShiftKey`, `LMenu` (Left Alt).

## Usage

Press the configured hotkey combo (default **LCtrl+D**) to restore any despawned persistent entities within 20 meters of you. A notification shows how many entities were restored and how many weapon re-drops occurred.

## Author

Gamecock Tomahawk
