L4D2 ONLY
Description
Allows both
gnome and
cola to do damage when shoving. Useful for some mutation gamemodes.
Features- Allows configuring the damage applied.
- Allows configuring the damage type applied.
- Allows forcing shove action when pressing the fire (M1) button.
- Allows removing the shove penalty while holding a gnome/cola.
- Allows enabling friendly fire and configuring the friendly fire damage amount.
- Allows configuring output to chat when equipped and which teams should the message be transmitted to.
Cvars
A configuration file named "
l4d2_gnome_n_cola_shove_dmg.cfg" will automatically be created for you upon the first run in the "
\cfg\sourcemod\" folder.
PHP Code:
// Allow the cola to do shove damage.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_cola_shove_dmg_allow "1"
// Alternate button for throwing the cola.
// 0 = OFF, 1 = RELOAD (R), 2 = ZOOM (M3), 3 = RELOAD (R) or ZOOM (M3).
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_cola_shove_dmg_alt_throw_button "3"
// Should the message be transmitted to those who picked up the cola.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_cola_shove_dmg_announce_self "1"
// Which teams should the message be transmitted to on cola equip.
// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for SURVIVOR and INFECTED.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "15.000000"
l4d2_cola_shove_dmg_announce_team "1"
// How much damage the cola does.
// -
// Default: "50"
// Minimum: "0.000000"
l4d2_cola_shove_dmg_damage "50"
// Which kind of damage type the cola does.
// Known values can be found here: https://developer.valvesoftware.com/wiki/Damage_types#Damage_type_table
// Add numbers greater than 0 for multiple options.
// Example: "136", enables DMG_CLUB and DMG_BURN.
// -
// Default: "128"
// Minimum: "0.000000"
l4d2_cola_shove_dmg_damage_type "128"
// How much friendly fire the cola does.
// 0 = OFF.
// -
// Default: "0"
// Minimum: "0.000000"
l4d2_cola_shove_dmg_ff_damage "0"
// Remove the shove penalty while holding the cola.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_cola_shove_dmg_no_shove_penalty "1"
// Force the client to shove the cola when pressing the attack button.
// Note: This prevents the cola from being thrown.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_cola_shove_dmg_shove_on_attack "1"
// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_gnome_n_cola_shove_dmg_enable "1"
// Delay in seconds to output to the chat the message from the same client again.
// 0 = OFF.
// -
// Default: "3.0"
// Minimum: "0.000000"
l4d2_gnome_n_cola_shove_dmg_spam_protection "3.0"
// Allow the gnome to do shove damage.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_gnome_shove_dmg_allow "1"
// Alternate button for throwing the gnome.
// 0 = OFF, 1 = RELOAD (R), 2 = ZOOM (M3), 3 = RELOAD (R) or ZOOM (M3).
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_gnome_shove_dmg_alt_throw_button "3"
// Should the message be transmitted to those who picked up the gnome.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_gnome_shove_dmg_announce_self "1"
// Which teams should the message be transmitted to on gnome equip.
// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for SURVIVOR and INFECTED.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "15.000000"
l4d2_gnome_shove_dmg_announce_team "1"
// How much damage the gnome does.
// -
// Default: "50"
// Minimum: "0.000000"
l4d2_gnome_shove_dmg_damage "50"
// Which kind of damage type the gnome does.
// Known values can be found here: https://developer.valvesoftware.com/wiki/Damage_types#Damage_type_table
// Add numbers greater than 0 for multiple options.
// Example: "136", enables DMG_CLUB (128) and DMG_BURN (8).
// -
// Default: "128"
// Minimum: "0.000000"
l4d2_gnome_shove_dmg_damage_type "128"
// How much friendly fire the gnome does.
// 0 = OFF.
// -
// Default: "0"
// Minimum: "0.000000"
l4d2_gnome_shove_dmg_ff_damage "0"
// Remove the shove penalty while holding the gnome.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_gnome_shove_dmg_no_shove_penalty "1"
// Force the client to shove the gnome when pressing the attack button.
// Note: This prevents the gnome from being thrown.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_gnome_shove_dmg_shove_on_attack "1"
Admin Commands
- sm_print_cvars_l4d2_gnome_n_cola_shove_dmg => Print the plugin related cvars and their respective values to the console. (z flag required)
Change Log
Current Translations
- en - English
- es - Spanish
- pt - Brazilian Portuguese
- pt_p - Portuguese
Known issues
- SDK_TakeDamage bypasses OnTakeDamage.
- Is possible to drop the cola right after picking it up by holding the FIRE button (M1), the gnome doesn't behave like this.
Notes
- Enabling the "Shove on Attack" cvar, prevents the gnome/cola from being thrown. Press "E" to drop or use.
- You can get a list of damage types and their values here sdkhooks.inc / Valve.
To Do
- Better damage handling (SDK_TakeDamage bypasses OnTakeDamage).
Thank you!
Related Plugins
Post Reply
- Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.
Installation
- Put the "l4d2_gnome_n_cola_shove_dmg.phrases.txt" file in your "\addons\sourcemod\translations\" folder.
- Put the "l4d2_gnome_n_cola_shove_dmg.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.