Revive & Heal
VORP has these natively in core. RSG doesn't — it's normally owned by an ambulance/EMS job resource. wc_libs never errors when that resource is missing; it warns to console and returns false.
Revive(source)server
Revives a downed player.
| Param | Type | Returns |
|---|---|---|
| source | integer | boolean — whether it actually ran |
underneath, on —
vorp_core — native
Core.Player.Revive(source)
rsg — delegates to ambulance job
exports['rsg-ambulancejob']:Revive(source)
-- if rsg-ambulancejob isn't running:
-- [wc_libs] Revive() called on RSG but 'rsg-ambulancejob' is not running — no-op.
Configurable export name. If your RSG server's ambulance job exposes a differently named export, point wc_libs at it in config rather than editing the adapter file directly.
wc_libs/shared/config.lua
WCLibConfig.RSGAmbulanceResource = 'rsg-ambulancejob'
WCLibConfig.RSGAmbulanceReviveExport = 'Revive'
WCLibConfig.RSGAmbulanceHealExport = 'Heal'
Heal(source)server
Heals a player to full health.
| Param | Type | Returns |
|---|---|---|
| source | integer | boolean — whether it actually ran |
example — used after a treatment minigame
local ok = wc:Heal(source)
if not ok then
-- ambulance job missing on RSG, or vorp_core out of date —
-- check console, fall back to your own logic if needed
end
Real Wild County example — admin revive command
wc_admin/server/commands.lua
RegisterCommand('revive', function(source, args)
local target = tonumber(args[1])
if not target then return end
local ok = wc:Revive(target)
wc:Notify(source, {
variant = ok and 'avanced' or 'fail',
title = ok and "Player revived." or "Revive failed — check console.",
})
end, true) -- restricted, admin ACE only
Common mistakes
- Calling
Revive/Healfrom the client — both are server-only exports. - Treating a
falsereturn as an error worth crashing over — on RSG it usually just means the ambulance job resource isn't running, which is expected on servers that don't use one. - Forgetting to gate admin-only revive/heal commands behind an ACE permission check.
Troubleshooting
- If
Revive/Healalways returnfalseon RSG: confirmWCLibConfig.RSGAmbulanceResourcematches a resource that is actually started, and that its export names matchRSGAmbulanceReviveExport/RSGAmbulanceHealExport. - If it fails on VORP: update
vorp_core—Core.Player.Revive/Healmust exist on the running build.