Related Plugins:
About:- Regenerates main health over time after using Adrenaline, Pain Pills or First Aid.
- Highly customisable, how much health, how fast, if temp health should be removed or replaced etc.
- Option to always regenerate main or temporary health.
Thanks:
- Iizuka07 - For the request.
CVars:
Saved to
l4d_healing.cfg in your servers
\cfg\sourcemod\ folder.
PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d_healing_allow "1"
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_healing_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_healing_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_healing_modes_tog "0"
// 0.0=Off. After taking damage wait this long before regenerating health again.
l4d_healing_damage "0.0"
// How much health to apply while the effect is active.
l4d_healing_health "2"
// How much health to apply while the effect is active, each time the timer fires. 0 Defaults to using l4d_healing_health cvar.
l4d_healing_health_adren "2"
// How much health to apply while the effect is active, each time the timer fires. 0 Defaults to using l4d_healing_health cvar.
l4d_healing_health_defib "2"
// How much health to apply while the effect is active, each time the timer fires. 0 Defaults to using l4d_healing_health cvar.
l4d_healing_health_first "2"
// How much health to apply while the effect is active, each time the timer fires. 0 Defaults to using l4d_healing_health cvar.
l4d_healing_health_pills "2"
// Maximum player health to prevent over-healing.
l4d_healing_max "100"
// Heal when their movement speed is slower than this. 0.0=Off. 76=Crouched. 86=Walking. 250=Running.
l4d_healing_moving "0.0"
// Maximum health Adrenaline can regenerate (L4D2 only).
l4d_healing_regen_adren "50.0"
// Maximum health Defibrillators can regenerate after defibbing someone (L4D2 only).
l4d_healing_regen_defib "50.0"
// Maximum health First Aid can regenerate.
l4d_healing_regen_first "100.0"
// Maximum health Pain Pills can regenerate.
l4d_healing_regen_pills "50.0"
// 0=Items regen main health. Regen with temp health: 1=Adrenaline (L4D2 only), 2=Pain Pills, 4=First Aid. 7=All. Add numbers together.
l4d_healing_regen_type "0"
// Survivors always regenerate health. 0=Off. 1=Main health. 2=Temp health. 3=Main health and replace temp while healing.
l4d_healing_regenerate "0"
// When allowed item types are used: 1=Remove health applied. 2=Replace temp health when healing with main health. 3=Both.
l4d_healing_temp "3"
// How often to heal the player.
l4d_healing_time "0.5"
// Which item to affect. 0=None, 1=Adrenaline (L4D2 only), 2=Pain Pills, 4=First Aid, 8=Defibrillator (L4D2 only), 15=All. Add numbers together.
l4d_healing_type "3"
// Healing plugin version
l4d_healing_version
Changes:
Code:
1.13 (05-Mar-2024)
- Fixed invalid handle errors. Thanks to "bullet28" for reporting and suggested solution.
1.12 (19-Feb-2023)
- Fixed healing not continuing when a bot or player takeover each other. Thanks to "Iciaria" for reporting.
1.11 (29-May-2022)
- Added cvars "l4d_healing_health_defib" and "l4d_healing_regen_defib" to give regenerative healing after being defibrillated.
- Changed cvar "l4d_healing_type" to accept the type of "8" to enable defibrillators healing on revive.
- Requested by "weakestL4D2enjoyer".
1.10 (01-Sep-2021)
- Fixed regenerative healing not working due to the last update. Thanks to "Maur0" for reporting.
1.9 (01-Sep-2021)
- Added cvars "l4d_healing_health_adren", "l4d_healing_health_first" and "l4d_healing_health_pills" to set health rate.
- Requested by "bald14".
1.8 (30-Sep-2020)
- Fixed compile errors on SM 1.11.
1.7 (10-May-2020)
- Extra checks to prevent "IsAllowedGameMode" throwing errors.
- Various changes to tidy up code.
1.6 (01-Apr-2020)
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
1.5 (06-Feb-2019)
- Fixed incorrect cvar change hook breaking "l4d_healing_moving" in L4D1. Thanks to "Dragokas" for reporting.
1.4 (28-Oct-2019)
- Optimized the way cvars are read to use less CPU cycles.
1.3 (23-Oct-2019)
- Fixed affecting temporary health while incapacitated.
1.2 (14-Oct-2019)
- Added cvar "l4d_healing_damage" to temporarily block regenerating health when taking damage.
- Added cvar "l4d_healing_regen_type" to set which items heal main or temp health.
- Added cvar "l4d_healing_regenerate" to always regenerate main or temporary health.
- Changed cvar "l4d_healing_temp" to control removing temp health. Recommended value "1, last version was "0".
- Changed cvar "l4d_healing_type" to disable regenerating health from items.
1.1 (12-Oct-2019)
- Added feature to regenerate health from First Aid Kits.
- Added cvar "l4d_healing_regen_first" to set First Aid health.
- Changed cvar "l4d_healing_type" to include First Aid.
1.0 (10-Oct-2019)
- Initial release.
Installation:- Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
Updating from 1.10 or older:- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.