Raised This Month: $23 Target: $400
 5% 

[L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.5) [15-Jul-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6987
Plugin Version:
1.5
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Fixes survivor_max_incapacitated_count cvar increased values reverting black and white screen. Also some extra options.
    Old 03-16-2020 , 20:05   [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.5) [15-Jul-2020]
    Reply With Quote #1

    Features:
    • Provides more options for both games, such as when the screen should turn black and white and how many revives are allowed.
    • Options to control when the heartbeat sound plays and when survivors should start vocalizing that they're about to die.
    • This plugins cvar l4d_heartbeat_revives overwrites the games survivor_max_incapacitated_count cvar, so set your desired value in this plugins cvar config.
    • Cvar default values of "2" is what the game uses by default.
    • This fixes L4D1 players going from black and white on the 2nd revive to normal color after subsequent revives when increasing the survivor_max_incapacitated_count cvar value.
    • In L4D1 this plugin overwrites and controls "m_currentReviveCount" netprop. Because this variable can no longer be relied on, plugins using that must change to use the 2 natives provided for accurate revive counts.
    • In L4D2 this plugin overwrites and controls "m_bIsOnThirdStrike". This netprop and the one above are used to make players screen black and white.
    • The bug is described here by Dragokas.



    Natives: (for 3rd party revive/respawn style plugins)
    Spoiler




    Thanks:
    • "Dragokas" - For the inspiration and help testing.



    CVars:

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

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

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

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

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

    // How many revives are allowed before a player is killed (wrapper to survivor_max_incapacitated_count cvar).
    l4d_heartbeat_revives "2"

    // How many revives until the black and white screen overlay starts.
    l4d_heartbeat_screen "2"

    // How many revives until the heartbeat sound starts playing.
    l4d_heartbeat_sound "2"

    // How many revives until the player starts vocalizing that they're about to die.
    l4d_heartbeat_vocalize "2"

    // Heartbeat plugin version.
    l4d_heartbeat_version 


    Changes:
    Code:
    1.5 (15-Jul-2020)
        - Added more StopSound calls on player spawn. Thanks to "Endoyurei Shirokuro" for reporting.
    
    1.4 (10-May-2020)
        - Various changes to tidy up code.
    
    1.3 (26-Apr-2020)
        - Added native "Heartbeat_GetRevives" for 3rd party plugins to get a players current incap count.
        - Added native "Heartbeat_SetRevives" for 3rd party plugins to set a players current incap count.
        - Changes to prevent duplicate heartbeat sounds playing.
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    
    1.2 (11-Apr-2020)
        - Fixed not resetting the heartbeat sound on player death.
    
    1.1 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.0 (17-Mar-2020)
        - Initial release.

    Installation:
    • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_heartbeat.sp - 47 views - 17.4 KB)
    __________________

    Last edited by Silvers; 07-14-2020 at 22:37.
    Silvers is offline
    Explait
    Junior Member
    Join Date: Oct 2019
    Old 03-17-2020 , 10:13   Re: [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.0) [17-Mar-2020]
    Reply With Quote #2

    Pretty good plugin!
    Explait is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine
    Old 03-31-2020 , 17:10   Re: [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.0) [17-Mar-2020]
    Reply With Quote #3

    Nice, works for me well, thanks for fixing that!
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch)
    [My plugins] [My tools] [GitHub] [Articles]
    Dragokas is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 04-26-2020 , 12:34   Re: [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.3) [26-Apr-2020]
    Reply With Quote #4

    Code:
    1.3 (26-Apr-2020)
        - Added native "Heartbeat_GetRevives" for 3rd party plugins to get a players current incap count.
        - Added native "Heartbeat_SetRevives" for 3rd party plugins to set a players current incap count.
        - Changes to prevent duplicate heartbeat sounds playing.
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    __________________

    Last edited by Silvers; 04-26-2020 at 12:34.
    Silvers is offline
    login101
    Senior Member
    Join Date: Sep 2017
    Old 04-27-2020 , 20:48   Re: [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.3) [26-Apr-2020]
    Reply With Quote #5

    good!
    login101 is offline
    Endoyurei Shirokuro
    New Member
    Join Date: Jun 2020
    Old 06-13-2020 , 06:41   Re: [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.4) [10-May-2020]
    Reply With Quote #6

    Hello?

    I've encountered an issue with your plugin. If I set survivor_max_incapacitated_count to 0 (you know, for a hardcore server), then if someone goes AFK, then goes back, the heartbeat sound starts playing to this player. The same goes to switching to another bot using the Survivor Bot Select plugin.
    Also if I do the same in server config file, nothing changes.

    Any chances you could look for a possible solution please? Honestly, I was hoping that with your plugin I'll be able to solve this problem…
    Endoyurei Shirokuro is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-16-2020 , 00:40   Re: [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.4) [10-May-2020]
    Reply With Quote #7

    I can't duplicate the issue. Can you provide some details on the steps required to cause this bug? I tried going AFK and using Survivor Bot Select plugin.

    Are you changing "survivor_max_incapacitated_count" cvar itself or are you setting "l4d_heartbeat_revives" to 0 which is what you should be doing because the latter overrides the former and required for the plugin to function correctly. Also send me your cvars config for this plugin so I can test with the same values. Thanks.
    __________________
    Silvers is offline
    Endoyurei Shirokuro
    New Member
    Join Date: Jun 2020
    Old 06-16-2020 , 07:48   Re: [L4D & L4D2] Heartbeat (Revive Fix - Post Revive Options) (1.4) [10-May-2020]
    Reply With Quote #8

    Well, I'm going AFK. When I press LMB to take control over bot, the heartbeat sound starts playing.
    When I type !pickbot in chat and take control over another bot, I hear the heartbeat sound.
    The sound doesn't start playing to a player who just connected to the server, though.

    I've tried changing those cvars separately (I mean, before changing «survivor_max_incapacitated_count» I remove your plugin). If I don't change the default cvar (or even remove it from the server config), but change the cvar in plugin's config, I hear the heartbeat sound.

    Just changed «l4d_heartbeat_revives» to 0. Nothing else.
    l4d_heartbeat.cfg
    Endoyurei Shirokuro 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 04:00.


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