Description
This plugin will make common zombies chase any survivor that shoot by creating an
info_goal_infected_chase entity attached to then. (similar to vomit/vomit jar behaviour)
I always felt that it was a bit unrealistic that sometimes you fire next to a common zombie and it doesn't detect you.
Features- Allows configuring a % chance to trigger.
- Allows configuring if bots should trigger it or not.
- Allows configuring which weapons should trigger it or not.
- Allows configuring the duration that new common zombies should chase after a shot.
- Allows configuring to chase every valid survivor when someone shoots.
- Allows configuring to chase on vocalize.
Cvars
A configuration file named "
l4d_shot_warns_common.cfg" will automatically be created for you upon the first run in the "
\cfg\sourcemod\" folder.
PHP Code:
// Trigger common zombies while an Adrenaline.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_adrenaline "0"
// Trigger common zombies while firing with a Auto Shotgun.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_auto_shotgun "1"
// Allow plugin behaviour on survivor bots.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_bots "1"
// Trigger common zombies while firing with a Chainsaw.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_chainsaw "1"
// Chance to trigger common zombies while firing.
// 0 = OFF.
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_shot_warns_common_chance "100.0"
// Trigger common zombies throwing or delivering a Cola Bottles.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_cola_bottles "0"
// Duration (seconds) that common zombies can be warned after shooting.
// -
// Default: "1.0"
// Minimum: "0.000000"
l4d_shot_warns_common_duration "1.0"
// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_enable "1"
// Should the zombies attack all valid survivors.
// 0 = Only the shooter, 1 = Every valid survivor.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_everyone "0"
// Allow trigger common zombies while external chase entities are activated.
// Examples: intro/ending cutscenes, covered by vomit or [L4D2 only] vomit jar cloud.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_external_chase "0"
// Trigger common zombies while throwing a Fireworks Crate.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_fireworks_crate "0"
// Trigger common zombies while throwing or pouring a Gascan.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_gascan "0"
// Trigger common zombies while throwing a Gnome.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_gnome "0"
// Trigger common zombies while firing with a Grenade Launcher.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_grenade_launcher "1"
// Trigger common zombies while firing with a Hunting Rifle.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_hunting_rifle "1"
// Trigger common zombies while firing with a 50cal.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_machine_gun_50cal "1"
// Trigger common zombies while firing with a Minigun.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_machine_gun_minigun "1"
// Trigger common zombies while attacking with a Baseball Bat.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_baseball_bat "0"
// Trigger common zombies while attacking with a Cricket Bat.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_cricket_bat "0"
// Trigger common zombies while attacking with a Crowbar.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_crowbar "0"
// Trigger common zombies while attacking with Custom Melees.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_custom "0"
// Trigger common zombies while attacking with an Electric Guitar.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_electric_guitar "0"
// Trigger common zombies while attacking with a Fire Axe.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_fireaxe "0"
// Trigger common zombies while attacking with a Frying Pan.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_frying_pan "0"
// Trigger common zombies while attacking with a Golf Club.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_golfclub "0"
// Trigger common zombies while attacking with a Katana.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_katana "0"
// Trigger common zombies while attacking with a Knife.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_knife "0"
// Trigger common zombies while attacking with a Machete.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_machete "0"
// Trigger common zombies while attacking with a Pitchfork.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_pitchfork "0"
// Trigger common zombies while attacking with a Riot Shield.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_riotshield "0"
// Trigger common zombies while attacking with a Shovel.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_shovel "0"
// Trigger common zombies while attacking with a Tonfa.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_melee_tonfa "0"
// Trigger common zombies while throwing a Molotov.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_molotov "0"
// Trigger common zombies while throwing an Oxygen Tank.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_oxygen_tank "0"
// Trigger common zombies while using a Pain Pills.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_pain_pills "0"
// Trigger common zombies while throwing a Pipe Bomb.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_pipe_bomb "0"
// Trigger common zombies while Pipe Bomb is beeping.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_pipe_bomb_beep "0"
// Trigger common zombies while firing with a Pistol.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_pistol "1"
// Trigger common zombies while firing with a Pistol Magnum.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_pistol_magnum "1"
// Trigger common zombies while throwing a Propane Tank.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_propane_tank "0"
// Trigger common zombies while firing with a Pump Shotgun.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_pump_shotgun "1"
// Trigger common zombies while firing with a AK47 Rifle.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_rifle_ak47 "1"
// Trigger common zombies while firing with a Desert Rifle.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_rifle_desert "1"
// Trigger common zombies while firing with a M16 Rifle.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_rifle_m16 "1"
// Trigger common zombies while firing with a M60 Rifle.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_rifle_m60 "1"
// Trigger common zombies while firing with a SG552 Rifle.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_rifle_sg552 "1"
// Allow trigger common zombies while survivors are in the starting safe area.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_safe_area "1"
// Trigger common zombies while firing with a Chrome Shotgun.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_shotgun_chrome "1"
// Trigger common zombies while firing with a Spas Shotgun.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_shotgun_spas "1"
// Trigger common zombies while firing with a SMG Uzi.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_smg_uzi "1"
// Trigger common zombies while firing with a SMG MP5.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_smg_mp5 "1"
// Trigger common zombies while firing with a Silenced SMG weapon.
// L4D2 only.
// 0 = OFF.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_smg_silenced "0"
// Trigger common zombies while firing with a AWP Sniper.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_sniper_awp "1"
// Trigger common zombies while firing with a Military Sniper.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_sniper_military "1"
// Trigger common zombies while firing with a Scout Sniper.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_sniper_scout "1"
// Allow trigger common zombies while a tank is alive.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_tank_alive "1"
// Don't trigger common zombies while silencer upgrade is active.
// L4D1 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_upgrade_silencer "1"
// Trigger common zombies while throwing a Vomit Jar.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_vomit_jar "0"
// Trigger common zombies while using vocalize command.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_shot_warns_common_vocalize "1"
Related Game Cvars
- pipe_bomb_initial_beep_interval => Time between the first and the second beep after throwing a pipe bomb. (default: 0.5)
Admin Commands
- sm_forcechase => Force common zombies chase on self (no args) or specified targets. Only works for survivors. Example: self -> sm_forcechase / target -> sm_forcechase @bots. (z flag required)
- sm_print_cvars_l4d_shot_warns_common => Print the plugin related cvars and their respective values to the console. (z flag required)
Change Log
Notes
- This plugin creates and attaches an info_goal_infected_chase to every survivor that fires.
- Some uncommon zombies can't be warned. (e.g: Road Worker / Jimmy Gibs / Fallen Survivor)
- Common zombies may ignore non-shooting players while another player shoots.
- When there are too many common zombies on the map you can hear a sound triggering, this is a game default behaviour.
To Do
- Add cvar to block behavior while have vomited players.
Thank you!
Related Plugins
Post Reply
- Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.
Installation
- Put the "l4d_shot_warns_common.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.