Raised This Month: $51 Target: $400
 12% 

[L4D2] Charger Punch Force (1.7) [22-Nov-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6905
Plugin Version:
1.7
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Survivors are flung when punched by Chargers.
    Old 01-16-2020 , 19:01   [L4D2] Charger Punch Force (1.7) [22-Nov-2023]
    Reply With Quote #1

    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!
    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.
    Attached Files
    File Type: txt l4d2_charger_punch.txt (1.4 KB, 647 views)
    File Type: smx l4d2_charger_punch.smx (8.9 KB, 125 views)
    File Type: sp Get Plugin or Get Source (l4d2_charger_punch.sp - 85 views - 14.4 KB)
    __________________

    Last edited by Silvers; 11-22-2023 at 16:26.
    Silvers is offline
    JustMadMan
    Member
    Join Date: Feb 2023
    Old 11-11-2023 , 10:31   Re: [L4D2] Charger Punch Force (1.6) [10-Apr-2022]
    Reply With Quote #2

    Not only survivors can flung when punched by Chargers but Special Infected too
    https://www.youtube.com/watch?v=kLOj0wMJ4Zc
    JustMadMan is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 11-22-2023 , 16:26   Re: [L4D2] Charger Punch Force (1.7) [22-Nov-2023]
    Reply With Quote #3

    Quote:
    Originally Posted by JustMadMan View Post
    Not only survivors can flung when punched by Chargers but Special Infected too
    https://www.youtube.com/watch?v=kLOj0wMJ4Zc
    Code:
    1.7 (22-Nov-2023)
        - Added cvar "l4d2_charger_punch_type" to control if Survivors or Special Infected or both can be affected.
    __________________
    Silvers is offline
    Reply



    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 01:17.


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