# [RELEASE] [VORP] redm_lockpick - Premium Lockpicking Minigame with Interactive SVG Electric Theme & Custom Notifications
Hello Cfx.re Community! 🤠
Today I am proud to share **redm_lockpick**, a highly polished, premium lockpicking minigame script designed specifically for **RedM (VORP Core)**.
This minigame takes the classic lockpicking concept to the next level by combining realistic physical lock rotation, tension mechanics, and a state-of-the-art **High-Voltage Electric Mode** featuring real-time generated 60fps SVG lightning animations, along with a robust custom notification system.
## ✨ Features
### 1. ⚡ Revolutionary Interactive "Electric Mode"
When using an **Electric Lockpick**, the entire minigame transforms into a gorgeous cyberpunk/high-voltage interface:
* **Dynamic Fractal Lightning Arcs:** Real-time SVG lightning bolts generated dynamically at 60fps. The lightning links the tip of your lockpick to the cylinder core.
* **Proximity Voltage Resonance:** As you rotate your lockpick closer to the sweet spot, the electric field turns from neon-cyan to a **brilliant glowing white-gold resonance** to guide the player naturally.
* **Tension Stress Feedback:** Applying pressure with your key increases the frequency, thickness, and erratic paths of the lightning.
* **High-Voltage Damage Sparks:** Shaking or damaging the lockpick shoots vibrant red-orange spark bursts outwards from the electrode contact point.
* **Electrical Blowout Overlay:** Breaking the lockpick triggers a massive screen-space electrical whiteout flash and a painful Front-End electric shock native effect (`Animpostfx` transition).
### 2. 📢 Centralized & Custom Notifications
Easily route lockpicking messages to any script on your server directly from the config:
* **Built-in Support:** Out-of-the-box support for `NEXTCODE-Notify2` and standard `VORPCore RightTip`.
* **Custom Callbacks:** Easily hook your own custom server notification event or export via `Config.CustomNotify = function(data)` in the config file without editing client code.
### 3. 🗺️ In-Game Testing Zone (Valentine)
* Includes a built-in training ground located near the Valentine stables, marked by a dynamic 3D 3-ring marker (purple blip modifier).
* Test four different difficulty presets: **Easy**, **Forced Normal**, **Forced Electric Hard** (requires electric lockpick), and **Custom Extreme Safe**.
### 4. 🚀 High Performance & Optimization
* **0.00ms CPU Usage:** Dynamic distance checks and lazy evaluation threads ensure the script consumes virtually zero resources when not playing the minigame or standing close to test points.
* **RedM Native Perfect Compatibility:** Fully updated using RDR3 native `AnimpostfxPlay` and `AnimpostfxStop` (guaranteed no FiveM-specific screen effect crashes).
---
## ⚙️ Configuration File (`config.lua`)
```lua
Config = {}
Config.Debug = true -- Toggle debugging messages
Config.EnableTestPoints = true -- Toggle the Valentine stable test zone
Config.AlwaysLoseLockpick = true -- Lose lockpick item on success/fail
Config.DifficultyPresets = {
easy = { solvePadding = 12, pinDamage = 8, numPins = 4, maxDistFromSolve = 50, pinDamageInterval = 300 },
normal = { solvePadding = 8, pinDamage = 15, numPins = 3, maxDistFromSolve = 45, pinDamageInterval = 200 },
hard = { solvePadding = 3, pinDamage = 35, numPins = 1, maxDistFromSolve = 35, pinDamageInterval = 120 },
}
-- Notification System: "nextcode" (NEXTCODE-Notify2), "vorp" (VORPCore standard) or "custom"
Config.NotificationSystem = "nextcode"
-- Triggered automatically if Config.NotificationSystem = "custom"
Config.CustomNotify = function(data)
-- data: { title = "Title", msg = "Message", type = "success/error/warning", time = 5000, placement = "middle-right" }
-- Hook your custom notify system here:
-- TriggerEvent("my_notify_script:show", data.title, data.msg, data.type)
end
Config.Lockpicks = {
{
name = "electric_lockpick",
label = "Electric Lockpick",
electric = true,
damageAmount = 25, -- Player health damage taken when shocked
ragdollTime = 4000, -- Electric shock ragdoll time in milliseconds
},
{
name = "lockpick",
label = "Standard Lockpick",
electric = false,
}
}
```
---
## 📦 How to Install
1. Download the resource and place the folder `redm_lockpick` into your RedM server resources directory.
2. Add `ensure redm_lockpick` to your `server.cfg`.
3. Add the items `lockpick` and `electric_lockpick` to your VORP Database / Inventory.
4. Restart your server and enjoy the most beautiful lockpicking experience in RedM!
---
## 🛠️ Technical Specs
* **UI Engine:** HTML5, CSS3 transitions, dynamic SVG vector mathematical drawing, and GreenSock GSAP (TweenMax).
* **Requirements:** `vorp_core`, `vorp_inventory`.
```