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

[L4D1 & L4D2] Shot Warns Common [v1.0.8 | 08-September-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7438
Plugin Version:
1.0.8
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Warns common zombies when shooting
    Old 12-31-2020 , 15:44   [L4D1 & L4D2] Shot Warns Common [v1.0.8 | 08-September-2021]
    Reply With Quote #1

    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

    Spoiler


    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_shot_warns_common.sp - 345 views - 73.4 KB)
    __________________

    Last edited by Marttt; 02-19-2023 at 21:54.
    Marttt is offline
    strikeraot
    Senior Member
    Join Date: Dec 2018
    Location: Viet Nam
    Old 01-02-2021 , 10:24   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.0 | 31-December-2020]
    Reply With Quote #2

    You're making this game more realistic with your plugins, thank you very much Marttt

    Last edited by strikeraot; 01-02-2021 at 10:24.
    strikeraot is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 01-02-2021 , 13:50   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.0 | 31-December-2020]
    Reply With Quote #3

    Got this error
    Code:
    L 01/02/2021 - 12:28:54: SourceMod error session started
    L 01/02/2021 - 12:28:54: Info (map "cdta_01detour") (file "C:\servers\kruffty\left4dead2\addons\sourcemod\logs\errors_20210102.log")
    L 01/02/2021 - 12:28:54: [SM] Exception reported: Entity 33 is not valid
    L 01/02/2021 - 12:28:54: [SM] Blaming: l4d_shot_warns_common.smx
    L 01/02/2021 - 12:28:54: [SM] Call stack trace:
    L 01/02/2021 - 12:28:54: [SM]   [0] FindEntityByClassname
    L 01/02/2021 - 12:28:54: [SM]   [1] Line 201, /home/forums/content/files/2/9/0/3/2/7/185970.attach::OnPluginEnd
    L 01/02/2021 - 12:28:54: Error log file session closed.

    Last edited by DarkDeviL; 01-31-2021 at 00:42. Reason: Added CODE tags
    Krufftys Killers is offline
    MedicDTI
    Junior Member
    Join Date: Jul 2019
    Old 01-03-2021 , 18:44   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.1 | 03-January-2021]
    Reply With Quote #4

    I loved this plugin man, it gives an air of more challenge.
    Taking advantage of this comment, I would like to make a suggestion that can be activated with a cvar in which silenced smg can attract less or have less chance of attracting those infected
    MedicDTI is offline
    JLmelenchon
    Senior Member
    Join Date: Mar 2019
    Old 01-07-2021 , 17:01   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.2 | 04-January-2021]
    Reply With Quote #5

    Does the vomit and the bile will override it ?
    JLmelenchon is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 01-07-2021 , 19:19   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.2 | 04-January-2021]
    Reply With Quote #6

    I won't say they override but they work fine together, at least from my test.
    __________________
    Marttt is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 01-08-2021 , 22:03   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.3 | 09-January-2021]
    Reply With Quote #7

    Getting Invalid Attachment specified from sp link
    Krufftys Killers is offline
    Sony Arizona
    New Member
    Join Date: Jan 2021
    Old 01-23-2021 , 23:39   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.3 | 09-January-2021]
    Reply With Quote #8

    Love this plugin can you make for all weapon not for SMG Silenced only, because some weapon mods have custom silencer...
    Sony Arizona is offline
    Beatles
    Senior Member
    Join Date: Feb 2014
    Old 02-12-2021 , 15:18   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.4 | 26-January-2021]
    Reply With Quote #9

    Bro, do you have the plugin in a previous version? It happens that the day before yesterday I updated your plugin, but now the infected get stuck, I fire and are alerted, but they stay stuck in one place, I say the first version you made was perfect, He did not need anything, I do not know why the change.
    Beatles is offline
    Maur0
    Senior Member
    Join Date: Aug 2020
    Old 02-12-2021 , 22:39   Re: [L4D1 & L4D2] Shot Warns Common [v1.0.5 | 12-February-2021]
    Reply With Quote #10

    Marttt I just just downloaded the new version thinking that you had fixed this problem, and now I see that the common infected are stuck in the same place looking the other way without attacking me or my colleagues every time we alert them :/

    I don't know if you fixed it right or this plugin would have broken. But I hope you can improve it like you always do.
    Maur0 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 12:44.


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