ev_grandma

EV Grandma Revive System
The EV Grandma Revive System allows players to get revived at specific NPCs, such as "Grandma" or "Grandpa," without needing hospital services. This is designed primarily for criminal-based gameplay or servers where hospital reliance isn't ideal.
Features
Multiple NPC locations for revival.
Fully integrated with ox_lib for advanced functionality.
Costs and payment methods configurable.
Player animations and NPC interactions.
Prevents abuse with "busy" checks and player validations.
Configuration
Server Configuration
The following settings can be modified to customize the revival system:
Client Configuration
NPC spawn, animations, and interaction points are managed through the client-side script.
Usage Instructions
How It Works
NPC Locations:
Defined in
Server.locations.Each NPC has unique coordinates, a model, and a "busy" status.
Interaction:
Players approach an NPC within the defined radius.
Use the ox_target or qb-target interaction to trigger the revive process.
Revival Process:
The player is charged (if applicable) and begins the revival process.
Animations are synced for both the player and NPC.
After the defined
duration, the player is revived.
Integration
Framework Support
Fully supports QBCore and ESX.
Payment methods adapt automatically based on the selected framework:
QBCore: Handles
cashorbank.ESX: Automatically converts
cashtomoney.
Key Functions
Client-Side
Spawn NPCs:
Spawns the NPCs dynamically when a player is within range.
Revive Interaction:
Triggers the revive process using
ox_targetorqb-target.
Progress Circle:
Visual feedback for the revival process.
Server-Side
Revive Logic:
Handles player validations, payments, and animations.
Sync Animations:
Ensures all nearby players see the revival animations.
Example Scenarios
Scenario 1: Standard Revival
A player approaches Grandma at a defined location.
The player interacts using ox_target or qb-target.
The server validates payment and availability.
The player begins the revival process and is revived after the progress bar completes.
Scenario 2: Busy NPC
Two players approach the same NPC.
The first player begins the revive process.
The second player receives a notification: "Grandma is busy right now."
Notes
NPC Removal:
NPCs are despawned when players leave the interaction radius.
Proper cleanup ensures server performance.
Custom Costs:
Adjust
Server.costto set the revival price. Set to0for free revives.
Multiple NPCs:
Add as many NPCs as needed by modifying
Server.locations.
Last updated