Raised This Month: $32 Target: $400
 8% 

[L4D2] Healing Cola (1.14) [03-Oct-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
2862
Plugin Version:
1.14
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    13 
    Plugin Description:
    Heals players with temporary or main health when they hold the Cola.
    Old 03-30-2012 , 06:53   [L4D2] Healing Cola (1.14) [03-Oct-2022]
    Reply With Quote #1



    Related Plugins:

    About:
    • Healing Cola Bottles.
    • Gives temporary health or main health. Not above 100 HP.
    • Can spawn in the saferoom (set cvar l4d2_cola_safe).
    • Save up to 32 Colas for auto-spawning. Saved to l4d2_cola.cfg in your servers \addons\sourcemod\data\ folder.


    Thanks:
    • JoBarfCreepy - For the request.


    Admin Commands: (requires "z" flag)

    PHP Code:
    sm_cola       // Spawns a temporary cola at your crosshair.
    sm_colasave   // Spawns a cola at your crosshair and saves to config.
    sm_coladel    // Removes the cola you are pointing at and deletes from the config if saved.
    sm_colawipe   // Removes all colas from the current map and deletes them from the config.
    sm_colaglow   // Toggle to enable glow on all colas to see where they are placed.
    sm_colalist   // Display a list cola positions and the total number of.
    sm_colatele   // Teleport to a cola (Usage: sm_colatele <index: 1 to MAX_COLAS>).
    sm_colaang    // Displays a menu to adjust the cola angles your crosshair is over.
    sm_colapos    // Displays a menu to adjust the cola origin your crosshair is over. 

    CVars:

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

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

    // 0=Off. Sets the max range at which the cola glows.
    l4d2_cola_glow "200"

    // 0=Default glow color. Three values between 0-255 separated by spaces. RGB: Red Green Blue.
    l4d2_cola_glow_color "255 0 0"

    // 0=Off, Remove black and white effect and give full health when regenerated to 100 with: 1=Temporary health. 2=Main health.
    l4d2_cola_full "0"

    // 0=Off, 1=Heal players holding the cola.
    l4d2_cola_heal "1"

    // Maximum main health to heal clients to.
    l4d2_cola_max_main "100"

    // Maximum temporary health to heal clients to.
    l4d2_cola_max_temp "100.0"

    // 0=Off. Interval in seconds, for healing someone holding the cola.
    l4d2_cola_time "1.0" 

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

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

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

    // -1=All, 0=None. Otherwise randomly select this many colas to spawn from the maps confg.
    l4d2_cola_random "-1"

    // The rate at which players are healed. HP per second.
    l4d2_cola_rate "1.5"

    // On round start spawn the cola: 0=Off, 1=In the saferoom, 2=Equip to random player.
    l4d2_cola_safe "0"

    // -1=Add temporary health, 0=Add to main health. Values between 1 and 100 creates a chance to give temp health, else main health.
    l4d2_cola_temp "5"

    // 0=Off. 1=Heal players around the player holding the cola.
    l4d2_cola_healing_field "1"

    // 0=Off. Interval in seconds, for the healing field trigger the heal and beacon again.
    l4d2_cola_healing_field_refresh_time "1.5"

    // Heal amount from being inside the healing field.
    l4d2_cola_healing_field_heal_amount "2.0"

    // Heal amount for incapped players from being inside the healing field.
    l4d2_cola_healing_field_heal_amount_incap "2.0"

    // 0=Only healing others. 1=Heal self and others.
    l4d2_cola_healing_field_self "1"

    // 0=Off. 1=Generates a beacon.
    l4d2_cola_healing_field_heal_beacon "1"

    // Healing field color. Three values between 0-255 separated by spaces. RGB: Red Green Blue.\nUse \"random\" to generate random colors.
    l4d2_cola_healing_field_color "0 255 0"

    // Healing field start radius.
    l4d2_cola_healing_field_start_radius "100.0"

    // Healing field end radius. Also determines the max distance to heal players around the player holding the cola.\nMax distance = (l4d2_cola_healing_field_end_radius / 2) because of the diameter.
    l4d2_cola_healing_field_end_radius "350.0"

    // How many seconds the healing field should last.
    l4d2_cola_healing_field_duration "1.0"

    // Healing field width.
    l4d2_cola_healing_field_width "3.0"

    // Healing field amplitude.
    l4d2_cola_healing_field_amplitude "0.0"

    // Healing Cola plugin version.
    l4d2_cola_version 

    Changes:
    Code:
    1.14 (03-Oct-2022)
        - Added cvar "l4d2_cola_time" to control how often to heal someone holding a gnome.
        - Now uses the "m_iMaxHealth" value instead of the "MAX_MAIN_HEALTH" define. Thanks to "Haigen" for changing.
        - Now checks if a Survivor is pinned to allow or disallow healing. Thanks to "Haigen" for fixing.
        - Removed unused define "MAX_INCAP_HEALTH" - uses the games "survivor_incap_health" cvar value.
    
    1.13 (15-Sep-2021)
        - Added cvar "l4d2_cola_healing_field_self" to determine if the Healing Field can heal yourself or not.
        - Changed cvar "l4d2_gnome_temp" to be a chance of giving temporary health.
        - Fixed Healing Field not healing players with the cvar specified amount. Thanks to "Maur0" for the reporting.
    
    1.12 (12-Sep-2021)
        - Re-wrote the heal client logic. Fixing various issues when reaching limits.
        - Now has two defines in the source code to set maximum health. MAX_INCAP_HEALTH for incap temp health. MAX_MAIN_HEALTH inclues main and temp health.
        - Various fixes brought over from "Healing Gnome" plugin.
    
    1.11 (30-Aug-2021)
        - Added cvars "l4d2_cola_max_main" and "l4d2_cola_max_temp" to control the maximum main and temporary health allowed to heal to.
        - Fixed cvar "l4d2_cola_heal" when set to "0" not allowing the healing field feature to work. Again.
        - Fixed losing temporary health when the limit was reached. Thanks to "Shao" for reporting.
        - Now ignores healing the holder with the standard healing when healing field is enabled.
    
    1.10 (06-Jun-2021)
        - Fixed cvar "l4d2_cola_heal" when set to "0" not allowing the Healing Field feature to work. Thanks to "ddd123" for reporting.
    
    1.9 (02-Apr-2021)
        - Healing Field update - by "Marttt":
        - This enables healing around a person carrying the Cola. Uses the same healing field effect like the "Medic" grenade from "Prototype Grenades" plugin.
    
        - Added cvars:
            "l4d2_cola_healing_field", "l4d2_cola_healing_field_refresh_time", "l4d2_cola_healing_field_heal_amount", "l4d2_cola_healing_field_heal_amount_incap",
            "l4d2_cola_healing_field_heal_beacon", "l4d2_cola_healing_field_color", "l4d2_cola_healing_field_start_radius", "l4d2_cola_healing_field_end_radius",
            "l4d2_cola_healing_field_duration", "l4d2_cola_healing_field_width", "l4d2_cola_healing_field_amplitude".	
    
        - See threads main post for details on the cvars.
    
    1.8 (31-Mar-2021)
        - Changed cvar "l4d2_cola_full" to give full health and remove the black and white effect, either on temporary or main health.
    
    1.7 (29-Mar-2021)
        - Added cvar "l4d2_cola_full" to give full health and remove the black and white effect. Requested by "weffer" and "Tonblader".
    
    1.6 (14-Aug-2020)
        - Fixed heal timer duplicating. Thanks to "Electr000999" for reporting.
    
    1.5 (10-May-2020)
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.    
        - Various changes to tidy up code.
    
    1.4 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.3 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    
    1.2 (21-Jul-2013)
        - Removed Sort_Random work-around. This was fixed in SourceMod 1.4.7, all should update or spawning issues will occur.
    
    1.1 (01-Jul-2012)
        - Added cvars "l4d2_cola_glow" and "l4d2_cola_glow_color" to make the cola glow.
        - Fixed healing players above 100 HP.
    
    1.0 (30-Mar-2012)
        - Initial release.

    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

    Updating from 1.13 or older:
    • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_cola.sp - 757 views - 52.6 KB)
    __________________

    Last edited by Silvers; 10-02-2022 at 23:18.
    Silvers is offline
    Homunculu
    Junior Member
    Join Date: Jul 2012
    Old 07-24-2012 , 05:25   Re: [L4D2] Healing Cola (1.1) [01-Jul-2012]
    Reply With Quote #2

    Can the rate of healing set to the figure smaller then 1?
    Homunculu is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-21-2013 , 12:53   Re: [L4D2] Healing Cola (1.2) [21-Jul-2013]
    Reply With Quote #3

    @Homunculu: I can't remember, if you set it lower and it doesn't work then I don't think theres anything I can do.


    Plugin updated

    1.2 (21-Jul-2013)
    - Removed Sort_Random work-around. This was fixed in SourceMod 1.4.7, all should update or spawning issues will occur.
    __________________
    Silvers is offline
    Fora
    Member
    Join Date: Aug 2012
    Old 01-13-2014 , 05:55   Re: [L4D2] Healing Cola (1.2) [21-Jul-2013]
    Reply With Quote #4

    Not working with [L4D & L4D2] Weapon Spawn (1.1)? No any error logs..
    Fora is offline
    foxhound27
    AlliedModders Donor
    Join Date: Sep 2019
    Location: Argentina
    Old 12-10-2019 , 13:10   Re: [L4D2] Healing Cola (1.3) [05-May-2018]
    Reply With Quote #5

    very nice, thank you i like this

    Last edited by foxhound27; 12-10-2019 at 15:55.
    foxhound27 is offline
    ETNKOREA
    Junior Member
    Join Date: Mar 2013
    Old 08-23-2021 , 05:32   Re: [L4D2] Healing Cola (1.10) [06-Jun-2021]
    Reply With Quote #6

    I want my HP and my fellow HP to go up at the same speed.
    How do I do this?
    ETNKOREA is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-24-2021 , 07:40   Re: [L4D2] Healing Cola (1.10) [06-Jun-2021]
    Reply With Quote #7

    Quote:
    Originally Posted by Fora View Post
    Not working with [L4D & L4D2] Weapon Spawn (1.1)? No any error logs..
    (I know this is from 2014).. Weapon Spawn doesn't spawn Cola bottles and the two plugins don't conflict so I don't know what you mean.

    Quote:
    Originally Posted by ETNKOREA View Post
    I want my HP and my fellow HP to go up at the same speed.
    How do I do this?
    Set the cvar "l4d2_cola_heal" to "0" and only allow "l4d2_cola_healing_field" to be "1" then you should all heal at the same rate.
    __________________
    Silvers is offline
    ETNKOREA
    Junior Member
    Join Date: Mar 2013
    Old 08-25-2021 , 01:50   Re: [L4D2] Healing Cola (1.10) [06-Jun-2021]
    Reply With Quote #8

    Quote:
    Originally Posted by Silvers View Post
    (I know this is from 2014).. Weapon Spawn doesn't spawn Cola bottles and the two plugins don't conflict so I don't know what you mean.


    Set the cvar "l4d2_cola_heal" to "0" and only allow "l4d2_cola_healing_field" to be "1" then you should all heal at the same rate.
    thank you!
    Is there a way to slow the speed of my HP?
    ETNKOREA is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-25-2021 , 08:01   Re: [L4D2] Healing Cola (1.10) [06-Jun-2021]
    Reply With Quote #9

    Quote:
    Originally Posted by ETNKOREA View Post
    thank you!
    Is there a way to slow the speed of my HP?
    Please read the cvars.
    __________________
    Silvers is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-30-2021 , 07:41   Re: [L4D2] Healing Cola (1.11) [30-Aug-2021]
    Reply With Quote #10

    Code:
    1.11 (30-Aug-2021)
        - Added cvars "l4d2_cola_max_main" and "l4d2_cola_max_temp" to control the maximum main and temporary health allowed to heal to.
        - Fixed cvar "l4d2_cola_heal" when set to "0" not allowing the healing field feature to work. Again.
        - Fixed losing temporary health when the limit was reached. Thanks to "Shao" for reporting.
        - Now ignores healing the holder with the standard healing when healing field is enabled.
    __________________
    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 23:12.


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