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

[L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7751
Plugin Version:
1.0.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Prevent survivors from helping themselves and teammates while taking damage
    Old 08-08-2021 , 21:42   [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #1

    Description

    This plugin prevents survivors from helping themselves and teammates while taking damage.

    Some examples where this is allowed without the plugin:
    • Helping an incapacitated teammate from fire/spitter while taking damage.
    • Healing yourself or a teammate while taking damage.
    • Defibrillating someone while taking damage.

    Features
    • Allow configuring plugin behavior on humans or bots only.

    Cvars

    A configuration file named "l4d_prevent_action_damage.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Which type of client (human/bot) should the plugin affect.
    // 0 = NONE, 1 = HUMAN, 2 = BOT, 3 = BOTH.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables for Humans and Bots.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d_prevent_action_damage_client_type "3"

    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_prevent_action_damage_enable "1" 
    Admin Commands
    • sm_print_cvars_l4d_prevent_action_damage => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • The animation may glitch.

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d_prevent_action_damage.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_prevent_action_damage.sp - 237 views - 11.5 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:20.
    Marttt is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 08-08-2021 , 23:25   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #2

    Finally! Now I can play a versus mode with the bots without having them pick up another survivor bot when they take damage, just like the original l4d1.

    Great job!
    Maur0 is offline
    KoMiKoZa
    Senior Member
    Join Date: Dec 2017
    Location: Thy old times.
    Old 08-09-2021 , 05:12   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #3

    Very nice!
    KoMiKoZa is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 08-09-2021 , 13:51   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #4

    Marttt - These two things just occurred to me:

    1) It is also possible to add the option to fill the gasoline as it does in the Versus and Scavenge mode, where you fill the gasoline in the car or generator and if you receive damage it is interrupted.

    2) You can perhaps separate the options and allow you to select which one you want to be activated. Example:
    Code:
    Helping an incapacitated teammate from fire/spitter while taking damage = Enable/Disabled
    
    Healing yourself or a teammate while taking damage = Enable/Disabled
    So more or less as to be separating and being able to some of those options that they want to have activated or not.

    Sorry if it's a bit complicated. But when you have time and if you can, great. Thanks.
    Maur0 is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 08-09-2021 , 14:06   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #5

    I thought it was interrupting the gas can filling, at least I remember doing that in my tests.

    About the filter option I will try but from my tests seems to be all or none otherwise the game glitches.

    Maybe there is some workaround to not bug, I need to do more testing, but thanks for the feedback, I will check when I have some free time.
    __________________
    Marttt is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 08-09-2021 , 14:48   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #6

    Great thanks!

    Edit: You're right. It was already included, just now I tried to see if what you said was already included and it worked. You fill up the gasoline but you take damage, it is interrupted.

    So the first one is already solved. And with regard to the second, it may be that perhaps now that I think about it you are right to avoid some bug or animation error there. But if you want to try it would be very good. If not it does not matter. The plugin was perfect. Thanks a lot.

    Last edited by Maur0; 08-09-2021 at 15:24.
    Maur0 is offline
    KoMiKoZa
    Senior Member
    Join Date: Dec 2017
    Location: Thy old times.
    Old 08-09-2021 , 17:16   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #7

    SM 1.10 / Linux.

    The reviving survivor got hit by a common, and the incapped person (that was being revived) got stuck in the getting up animation, it kept looping.

    Hitting the incapped person with melee solved the issue. I can upload a video later if required.

    Last edited by KoMiKoZa; 08-09-2021 at 17:20.
    KoMiKoZa is offline
    KasperH
    Senior Member
    Join Date: Apr 2016
    Location: Hungary
    Old 08-17-2021 , 13:22   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #8

    Hey!
    I'm using the plugin with "l4d_prevent_action_damage_client_type "2" so only with bots, and the one problem I have if a player gets downed the bots don't revive them, no incoming damage they just stand there and watch the suffer.
    Windows, SM 1.11 6736
    __________________

    "I've Got You In My Sights!"
    KasperH is offline
    TQH
    Junior Member
    Join Date: May 2021
    Location: Vietnam
    Old 10-07-2021 , 01:48   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #9

    Video demonstration of bug: https://youtu.be/4t20E84JDPM
    TQH is offline
    Psyk0tik
    Veteran Member
    Join Date: May 2012
    Location: Homeless
    Old 10-07-2021 , 08:14   Re: [L4D1 & L4D2] Prevent Survivor Action On Damage [v1.0.0 | 08-August-2021]
    Reply With Quote #10

    Here's my personal version of the plugin. It uses the game's own functions to properly cancel any ongoing actions when survivors take damage.

    This version should fix the following issues found in the official version:
    - Animation glitches (Reported by KoMiKoZa and demonstrated by TQH)
    - Target loss glitches (Reported by KasperH)

    Note: In case a future update breaks the signatures, just click on the link in my forum signature below and search for "StopBeingRevived" and "StopRevivingSomeone".

    Tested and confirmed to work as intended on both games and platforms.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_prevent_action_damage.sp - 256 views - 11.3 KB)
    File Type: txt l4d_prevent_action_damage.txt (4.0 KB, 149 views)
    __________________
    Psyk0tik is offline
    Reply


    Thread Tools
    Display Modes

    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 02:29.


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