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