wasvendel_health
wasvendel scripts
wasvendel_health
wasvendel scripts
Unzip wasvendel_health.
Drag the wasvendel_health folder into your server's resources directory.
Add the resource to your server.cfg after your framework core and dependencies.
ensure oxmysql ensure your_core ensure wasvendel_minigame ensure wasvendel_health
| Resource | Required | Description |
|---|---|---|
oxmysql | Yes | Injury state persistence. |
wasvendel_minigame | Yes | Doctor heal minigames. |
Tables are created automatically on first start.
No manual SQL import is required.
Edit configs/config.lua to configure injury settings, doctor jobs, NPC doctor, self-heal, and revive limits.
| Setting | Default | Description |
|---|---|---|
Config.injuryPanelCommand | mystatus | Command used to open the injury panel. |
Config.remoteInjuryStatusEnabled | Configurable | Allows querying other players' injury status. |
| Command | Usage | Description |
|---|---|---|
/mystatus | /mystatus | Opens the injury status panel. |
/doctor | /doctor [id] | Opens the doctor menu for a target or the nearest player. |
/wh_injtest | /wh_injtest ... | Development injury test commands. |
Doctor commands and menus are restricted by job configuration in configs/config.lua under Config.doctor.
| Event | Payload | Description |
|---|---|---|
wasvendel_health:openInjuryPanel | None | Opens the injury panel. |
wasvendel_health:closeInjuryPanel | None | Closes the injury panel. |
wasvendel_health:client:OpenSelfBandageMenu | None | Opens the self-bandage menu. |
wasvendel_health:notifyRelay | msg, ms | Sends a notification relay. |
| Event | Payload | Description |
|---|---|---|
wasvendel_health:client:DoctorHealOpen | targetServerId | Opens the doctor heal menu. |
wasvendel_health:client:DoctorActionResult | ok, code | Sends the doctor action result. |
wasvendel_health:client:DoctorApplyHealRegion | region, delta, playSitPose | Applies region healing on the patient. |
wasvendel_health:client:DoctorApplyHealHp | addHp | Applies HP healing on the patient. |
wasvendel_health:client:FrameworkRevivePed | None | Performs a framework revive. |
wasvendel_health:client:FrameworkHealPed | None | Performs a framework heal. |
| Event | Payload | Description |
|---|---|---|
wasvendel_health:client:NpcDoctorGranted | token | Grants an NPC doctor session. |
wasvendel_health:client:NpcDoctorFullHealInjuries | None | Fully heals injuries through the NPC doctor. |
| Event | Payload | Description |
|---|---|---|
wasvendel_health:client:InjuryStatusResult | rid, success, err, data, fromTarget | Returns the remote injury query result. |
wasvendel_health:client:InjuryStatusCollect | rid, requester | Collects local injury data for a remote query. |
wasvendel_health:client:LoadPersistedState | payload | Loads the saved injury state. |
| Event | Payload | Description |
|---|---|---|
wasvendel_health:client:ItemConsumeSequence | data | Starts the item consume animation sequence. |
wasvendel_health:client:ConsumableHealAnim | durationMs, dict, name, flag | Starts the heal animation. |
| Event | Payload | Description |
|---|---|---|
wasvendel_health:server:RequestInjuryStatus | rid, targetId | Requests remote injury status. |
wasvendel_health:server:DoctorHealMenu | targetServerId | Opens the doctor menu after server validation. |
wasvendel_health:server:DoctorRevivePatient | targetServerId | Revives a patient. |
wasvendel_health:server:DoctorHealRegion | targetServerId, region | Heals a patient region. |
wasvendel_health:server:SelfTreatRegion | region, injuryReported | Self-treats a region. |
wasvendel_health:server:NpcDoctorRequest | px, py, pz | Requests an NPC doctor. |
wasvendel_health:server:UpsertPersistedState | state | Saves the injury state. |
| Event | Payload | Description |
|---|---|---|
wasvendel_health:radialOpenDoctorClosest | data | Radial menu integration hook. |
wasvendel_health:internal:InjuryChanged | None | Triggered when local injury changes. |
| Event | Payload | Description |
|---|---|---|
wasvendel_health:internal:FrameworkReady | fw | Triggered when the framework bridge is ready. |
All exports listed below are safe to call from other resources.
| Export | Signature | Description |
|---|---|---|
GetLocalInjuryStatusSnapshot | () -> table | Returns the local injury snapshot. |
RequestPlayerInjuryStatus | (targetServerId, callback) | Queries another player's injury status asynchronously. |
OpenInjuryPanel | () | Opens the injury UI. |
CloseInjuryPanel | () | Closes the injury UI. |
PersistNow | () | Forces immediate database persistence. |
GetInjuryPanelData | () -> table | Returns data for the injury panel. |
GetRegionInjury | () -> table | Returns the region injury map. |
GetBoneInjury | () -> table | Returns per-bone injury values. |
SetRegionInjury | (region, value) | Sets region injury percentage. |
SetBoneInjury | (boneId, value) | Sets bone injury. |
SetBoneHealth | (boneId, healthPercent) | Sets bone health percentage. |
ResetAllRegionInjury | () | Resets all region injuries. |
GetBoneHealthMap | () -> table | Returns the bone health map. |
ApplyBoneHealthMap | (map) | Applies a bone health map. |
IsInjuryDirty | () -> boolean | Returns whether the injury state needs saving. |
ClearInjuryDirty | () | Clears the dirty flag. |
BeginInjuryGrace | (ms?) | Temporarily suppresses injury detection (default: Config.injury.spawnGraceMs). |
IsInjurySuppressed | () -> boolean | Returns whether injury detection is currently suppressed. |
HealRegionInjury | (region, deltaInjuryPoints?) | Heals a region. Optional second argument sets heal amount. |
SetRegionInjuryTo | (region, value) | Sets a region to an exact value. |
FullHeal | () | Fully heals all injuries. |
GetSnakePoison | () -> number | Returns current snake poison percentage (0–100). |
IsSnakePoisoned | () -> boolean | Returns whether the player is currently poisoned. |
IsSnakeStabilized | () -> boolean | Returns whether snake poison is stabilized. |
SetSnakePoison | (pct) | Sets snake poison percentage. |
ClearSnakePoison | () | Fully clears snake poison. |
StabilizeSnakePoison | () -> boolean | Stabilizes active snake poison. |
ReduceSnakePoison | (amount) -> number | Reduces snake poison and returns the new percentage. |
RequestSuckVenom | (targetServerId) -> boolean | Starts the venom-suck interaction with a target player. |
OpenDoctorMenu | (targetServerId) | Opens the doctor menu for a target. |
OpenDoctorMenuClosest | (maxDistance) | Opens the doctor menu for the nearest player. |
| Export | Signature | Description |
|---|---|---|
DoctorHealPlayer | (doctorSource, targetServerId) -> boolean | Opens the doctor heal menu for a doctor. |
WasvendelHealthReviveSyncPlayer | (targetSid) | Syncs revive quota state for a player. |
WasvendelHealthRevivePrecheckTarget | (targetSid) -> boolean | Checks whether the target can be revived. |
WasvendelHealthReviveConsumeAttempt | (targetSid) -> boolean | Consumes a revive attempt. |
WasvendelHealthReviveRefundAttempt | (targetSid) | Refunds a revive attempt. |
Listen on the client for the radial menu event:
Use server exports to integrate with external revive scripts:
Supports VORP and RSG.
Character load automatically restores the injury state.
| Framework | Event |
|---|---|
| VORP | vorp:SelectedCharacter |
| RSG | RSGCore:Client:OnPlayerLoaded |
Doctor region heal minigames use wasvendel_minigame exports.
Make sure wasvendel_minigame is started before wasvendel_health.