Raised This Month: $ Target: $400
 0% 

[L4D & L4D2] Shove Handler (1.13) [30-Apr-2024]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
8054
Plugin Version:
1.13
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
3 
Plugin Description:
Overrides the shoving system, allowing to set number of shoves before killing, stumble and damage per bash, for SI and Common.
Old 05-16-2022 , 16:56   [L4D & L4D2] Shove Handler (1.13) [30-Apr-2024]
Reply With Quote #1

About:
  • Customize how many shoves to kill Common Infected, Witch and Special Infected (or no shove limit)
  • Customize how much damage each shove causes
  • Prevent stumbling or enable stumbling
  • Block insta kill on shoving Common Infected from behind


Thanks:
  • Toranks - For the request.
  • Lux - For scripting advice.
  • Dragokas - For scripting advice.
  • Marttt - For scripting advice.


Cvars:

Saved to l4d_shove_handler.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d_shove_handler_allow "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_shove_handler_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_shove_handler_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_shove_handler_modes_tog "0"

// 0=Off. 1=Allow (game default). Can Common Infected be insta-killed when first shoving their back.
l4d_shove_handler_common_back "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_boomer "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_charger "0"

// 0=Ignore shove count killing common. How many shoves does it take to kill a common infected (game default is 4).
l4d_shove_handler_count_common "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_hunter "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_jockey "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_smoker "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_spitter "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_tank "0"

// 0=Ignore shove count (unlimited shoves). How many shoves does it take to kill.
l4d_shove_handler_count_witch "0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_boomer "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_charger "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_common "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_hunter "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_jockey "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_smoker "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_spitter "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_surv "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_tank "10.0"

// 0.0=None (game default). Amount of damage each shove causes. If using percentage type, 100.0 = full health.
l4d_shove_handler_damage_witch "10.0"

// Who can be damaged when shoved: 0=None, 1=Common, 2=Smoker, 4=Boomer, 8=Hunter, 16=Spitter, 32=Jockey, 64=Charger, 128=Tank, 256=Witch. 511=All. Add numbers together.
l4d_shove_handler_damaged "511"

// 0=No deadstop. 1=Allow Survivors to shove a hunter that was flying in the air to deadstop it (game default).
l4d_shove_handler_hunter "1"

// Stumble when shoved: 0=None, 1=Common, 2=Smoker, 4=Boomer, 8=Hunter, 16=Spitter, 32=Jockey, 64=Charger, 128=Tank (default off), 256=Witch (default off). 511=All. Add numbers together.
l4d_shove_handler_stumble "127"

//0=Block Survivors shoving other Survivors. 1=Allow Survivors to shove each other (game default).
l4d_shove_handler_survivor "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_boomer "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_charger "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_common "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_hunter "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_jockey "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_smoker "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_spitter "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_surv "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_tank "1"

// 1=Deal the damage value specified. 2=Deal the specified damage value as a percentage of their maximum health.
l4d_shove_handler_type_witch "1"

l4d_shove_handler_version // Shove Handler plugin version. 


Changes:
Code:
1.13 (30-Apr-2024)
    - Fixed damage cvars not setting on the correct player classes.
    - To block stumble on Special Infected this plugin requires Left4DHooks version 1.147 or newer.

1.12 (25-Mar-2024)
    - Added cvars "l4d_shove_handler_damage_surv" and "l4d_shove_handler_type_surv" to control Survivor damage on shove.
    - Fixed not being able to free Survivors from Smokers and Jockeys if "l4d_shove_handler_survivor" was set to "0". Thanks to "glhf3000" for reporting.
    - Various changes to fix incorrect damage or cvar settings being followed.

1.11 (07-Nov-2023)
    - L4D1: Fixed not affecting the Tank. Thanks to "ZBzibing" for reporting.
    - Fixed the count cvar not affecting the Witch correctly if the Common count cvar was not enabled.

1.10 (31-Mar-2023)
    - Changed the "l4d_shove_handler_hunter" cvar description to better describe what it does.
    - Fixed the Hunter sometimes not moving after stumbling when shoved. Thanks to "KoMiKoZa" for reporting.

1.9 (10-Mar-2023)
    - Fixed invalid edict errors. Thanks to "Voevoda" for reporting.

1.8 (08-Oct-2022)
    - Added cvar "l4d_shove_handler_survivor" to allow or disallow survivors shoving each other. Requested by "MilanesaTM".

1.7 (04-Aug-2022)
    - Fixed cvar "l4d_shove_handler_hunter" not always working. Thanks to "ZBzibing" for reporting.
    - Fixed the plugin damaging other entities such a GasCans. Thanks to "moschinovac" for reporting.

1.6 (14-Jul-2022)
    - Added cvar "l4d_shove_handler_hunter" to allow or disallow punching an airborne hunter. Requested by "ZBzibing".
    - Code changes that require SourceMod version 1.11.

1.5 (20-Jun-2022)
    - Fixed array index out-of-bounds error. Thanks to "Voevoda" for reporting.

1.4 (03-Jun-2022)
    - Fixed blocking Common Infected stumble not triggering the "entity_shoved" event correctly.
    - This fix will cause the "entity_shoved" event to fire twice, once with the attacker value of "0" and after with the real attacker index.
    - This fixes some plugin conflicts such as "Molotov Shove", "PipeBomb Shove" and "Vomitjar Shove" plugins.

    - Changed the "modes" cvars method to use "Left4DHooks" forwards and natives instead of creating an entity.

1.3 (27-May-2022)
    - Fixed not stumbling Tanks or Witches. Thanks to "Maur0" for reporting.

1.2 (20-May-2022)
    - Fixed the Tank and Witch cvars not being read in L4D1.
    - Fixed SI sometimes being stuck floating. Thanks to "Toranks" for reporting.
    - Fixed array out-of-bounds. Thanks to "Toranks" for reporting.

1.1 (17-May-2022)
    - Fixed blood splatter appearing on shoves when damage is set to 0. Thanks to "Toranks" for reporting.
    - Fixed SI getting stuck when shoved in the air and made to stumble. Thanks to "Toranks" for reporting.

1.0 (16-May-2022)
    - Initial release.


Requirements:
  1. Left 4 DHooks Direct plugin version 1.102 or newer.



Installation:
DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires Left 4 DHooks Direct!
  1. Download the .smx file and put into your servers \addons\sourcemod\plugins folder.
  2. Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.


Updating from 1.7 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

Provided .smx has been compiled with SourceMod 1.11.
Attached Files
File Type: txt l4d_shove_handler.txt (2.8 KB, 685 views)
File Type: smx l4d_shove_handler.smx (18.3 KB, 26 views)
File Type: sp Get Plugin or Get Source (l4d_shove_handler.sp - 32 views - 32.6 KB)
__________________

Last edited by Silvers; 04-30-2024 at 09:51.
Silvers is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode