Related Plugins:
About:- Flings survivors when punched by a Charger.
- It is very difficult to punch a Survivor while Charging. The game will most likely pickup the Survivor unless you're using the Charger Actions plugin to disable pickup and carry.
- This will also conflict with those functions from the Charger Actions plugin, do not request any fix or workaround as that's something I won't do.
- With the cvar l4d2_charger_punch_fling "1" it may not be possible to control the force they're thrown. Untested, please report.
Thanks:- Ethan Max - For the request and testing.
- Lux - For explaining the functions a virtual hook.
- "honorcode23" for the FlingPlayer function.
Cvars:
Saved to
l4d2_charger_punch.cfg in your servers
\cfg\sourcemod\ folder.
PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d2_charger_punch_allow "1"
// Only fling survivors when punched by a Charger that is charging. 0=No. 1=Yes. Very hard to punch and hit while charging, added by request.
l4d2_charger_punch_charging "0"
// The type of fling. 1=Fling with get up animation. 2=Teleport player away from Charger.
l4d2_charger_punch_fling "1"
// The velocity a survivors is flung when punched by the Charger.
l4d2_charger_punch_force "200.0"
// The vertical velocity a survivors is flung when punched by the Charger. Must be greater than 250 to lift a Survivor.
l4d2_charger_punch_forcez "251.0"
// Which team does this plugin affect. 1=Survivors. 2=Special Infected. 3=Both.
l4d2_charger_punch_type "1"
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d2_charger_punch_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d2_charger_punch_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d2_charger_punch_modes_tog "0"
// Charger Punch Force plugin version
l4d2_charger_punch_version
Changes:
Code:
1.7 (22-Nov-2023)
- Added cvar "l4d2_charger_punch_type" to control if Survivors or Special Infected or both can be affected.
1.6 (10-Apr-2022)
- Fixed rare error if a client disconnects 1 frame after punching.
1.5 (14-Nov-2021)
- Changes to fix warnings when compiling on SourceMod 1.11.
- Updated GameData signatures to avoid breaking when detoured by the "Left4DHooks" plugin.
1.4 (23-May-2020)
- Fixed conflict with "Charger Actions" plugin when punch to carry is enabled.
- Fixed flinging a Survivor too far due to multiple hits within the same frame.
- Fixed not disabling punches if the plugin was turned off while a Charger was alive.
- Now teleports incapacitated players instead of flinging which makes them play the get up animation.
1.3 (10-May-2020)
- Added better error log message when gamedata file is missing.
- Extra checks to prevent "IsAllowedGameMode" throwing errors.
1.2 (01-Apr-2020)
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
1.1 (04-Mar-2020)
- Extra simple check incase of errors from invalid clients spawning.
1.0 (17-Jan-2020)
- Initial release.
Requirements:
Installation:DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires DHooks!
- Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
- Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.