Saferoom Naps: Spawn Next Map With 50 HP
Made for L4D2. Not tested on L4D, but will work if the survivors are considered client team 2.
Intended for co-op gamemodes. The plugin code still executes on versus, but is totally obsolete: code is fired before map transition, but in versus survivors start new rounds on a clean slate with full health.
A very simple plugin that sets players below 50 permanent hp to 50 hp (configurable) on the next map.
In hard coop gamemodes, a popular strategy is to kill low health players at the end of each map so that they can respawn with 50health on the next map. In a game that emphasizes teamwork and surviving together, this is pretty jarring and immersion-breaking.
My plugin fixes that by healing lowhealth players to 50hp - or the server's "z_respawn_health" value - and resetting their incap counter (times you can be incapped before going black-and-white) before the map transition. This makes the need to kill one another redundant.
If set to 1, allows you to input your own health value to set lowhp players to. Otherwise uses the "z_respawn_health" value, which is 50 by default.
//Default 50. (Unused)
Only used if CanWeUseCustomValue is set to 1.
Self explanatory. Whether to remove blackandwhite. Enabled by default.
Float to multiply lowhp players' temporary health by. Its zero by default, meaning all temporary health is removed.
Float to multiply healthy (those above the saferoomhp value) players' temporary health by. Its 1 by default, meaning all temporary health is kept. Set to 0 for consistency: if low health players lose their temp health after resting, why shouldnt high hp players do so too?
kaffaljidhma - Inspiration. They were the first to make a plugin
addressing the issue. Sadly their code is super clunky and totally bork.
disawar1 - Their Say Event plugin
helped me find the correct event to hook to.