Raised This Month: $7 Target: $400
 1% 

[L4D1 & L4D2] Projectile Hittable [v1.0.8 | 05-March-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7334
Plugin Version:
1.0.8
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows projectiles and throwables to explode when hit
    Old 10-12-2020 , 18:42   [L4D1 & L4D2] Projectile Hittable [v1.0.8 | 05-March-2022]
    Reply With Quote #1

    Description

    This plugin allows the projectiles and throwables below to explode when hit, also outputs to the chat who has exploded it:
    • Molotov
    • Pipe Bomb
    • Vomit Jar
    • Grenade Launcher (only projectile)

    Features
    • Allow selecting which projectiles/throwables should explode when hit by chance.
    • Allow selecting which projectiles should output to the chat.
    • Allow selecting which teams should see the message.
    • Output the name of who exploded the projectile to the chat.
    • Allow adding a delay for the molotov ground fire when a molotov projectile is destroyed.
    • Allow controlling the duration of the vomit jar particle/infected chase when a vomit jar is destroyed.
    • Allow controlling the plugin for bots.
    • Allow controlling the plugin for teams.
    • Allow controlling which SI can trigger explosions on unequipped throwables.
    • Allow exploding projectiles on touch by chance.

    Chat message examples
    • Mart has exploded a molotov!
    • Mart has exploded a pipe bomb!
    • Mart has exploded a vomit jar!
    • Mart has exploded a grenade!

    Cvars

    A configuration file named "l4d_projectile_hittable.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Should the message be transmitted to those who hit it.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_announce_self "1"

    // Which teams should the message be transmitted to.
    // 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"
    l4d_projectile_hittable_announce_team "1"

    // Plugin behaviour enabled for bots.
    // 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 bots.
    // -
    // Default: "9"
    // Minimum: "0.000000"
    // Maximum: "15.000000"
    l4d_projectile_hittable_bots "9"

    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_enable "1"

    // Allow grenades to explode when hit.
    // L4D2 only.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_grenade "1"

    // Output to the chat every time someone hits a grenade.
    // L4D2 only.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_grenade_announce "1"

    // Chance to grenades explode when hit.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d_projectile_hittable_grenade_chance "100"

    // Allow melee damage to break projectiles.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_melee "1"

    // Allow molotovs to explode when hit.
    // 0 = OFF, 1 = Only thrown molotovs (projectile), 2 = Only ground molotovs (weapon).
    // Example: "3", enables explosion for thrown and ground molotovs.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d_projectile_hittable_molotov "3"

    // Output to the chat every time someone hits a molotov.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_molotov_announce "1"

    // Chance to molotovs explode when hit.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d_projectile_hittable_molotov_chance "100"

    // Delay in seconds to molotov create fire spots when hit.
    // -
    // Default: "1.0"
    // Minimum: "0.000000"
    l4d_projectile_hittable_molotov_delay "1.0"

    // Chance to molotov projectiles to explode on touch.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d_projectile_hittable_molotov_touch_chance "100"

    // Allow pipe bombs to explode when hit.
    // 0 = OFF, 1 = Only thrown pipe bombs (projectile), 2 = Only ground pipe bombs (weapon).
    // Example: "3", enables explosion for thrown and ground pipe bombs.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d_projectile_hittable_pipebomb "3"

    // Output to the chat every time someone hits a pipe bomb.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_pipebomb_announce "1"

    // Chance to pipe bombs explode when hit.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d_projectile_hittable_pipebomb_chance "100"

    // Chance to pipe bomb projectiles to explode on touch.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d_projectile_hittable_pipebomb_touch_chance "100"

    // Allow shove damage to break projectiles.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_shove "1"

    // Which special infected can trigger unequipped throwables explosions.
    // 1 = SMOKER, 2 = BOOMER, 4 = HUNTER, 8 = SPITTER, 16 = JOCKEY, 32 = CHARGER, 64 = TANK.
    // Add numbers greater than 0 for multiple options.
    // Example: "127", enables explosion for all SI.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "127.000000"
    l4d_projectile_hittable_si "0"

    // Plugin behaviour enabled for these teams.
    // 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: "11"
    // Minimum: "0.000000"
    // Maximum: "15.000000"
    l4d_projectile_hittable_team "11"

    // Allow vomit jars to explode when hit.
    // 0 = OFF, 1 = Only thrown vomitjars (projectile), 2 = Only ground vomitjars (weapon).
    // Example: "3", enables explosion for thrown and ground vomit jars.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d_projectile_hittable_vomitjar "3"

    // Output to the chat every time someone hits a vomit jar.
    // L4D2 only.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_projectile_hittable_vomitjar_announce "1"

    // Chance to vomit jars explode when hit.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d_projectile_hittable_vomitjar_chance "100"

    // How long (in seconds) the vomit particle and the infected chase should last.
    // -
    // Default: "20.0"
    // Minimum: "0.000000"
    l4d_projectile_hittable_vomitjar_duration "20.0"

    // Chance to vomit jar projectiles to explode on touch.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d_projectile_hittable_vomitjar_touch_chance "100" 
    Admin Commands
    • sm_print_cvars_l4d_projectile_hittable => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Current Translations
    • en - English
    • es - Spanish
    • hu - Hungarian
    • pt - Brazilian Portuguese
    • pt_p - Portuguese

    Notes
    • This plugin precache some models.
    • Vomit jars exploded by the plugin don't spawn extra zombies.
    • When vomit jars or molotovs are exploded in the air, by default it doesn't show particles, so this plugin simulates it.
    • The pipe bomb is the only projectile that doesn't trigger as soon as it touches the ground, so is possible to explode it while in the ground.
    • The vomit jar only applies to the L4D2 game, since L4D1 don't have vomit jars.
    • The grenade only applies to the L4D2 game, since L4D1 don't have grenade launchers.
    • In L4D2 I use the "weapon_drop" event to detect when a weapon is dropped, but in L4D1, since this event doesn't exist, I set the "m_takedamage" netprop to "2" on every ThinkPost (when unequipped/owner = -1).

    To Do
    • Add vomit effect (IT) to nearby zombies when a vomit jar is destroyed.

    Thank you!

    Related Plugins

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d_projectile_hittable.phrases.txt" file in your "\addons\sourcemod\translations\" folder.
    • Put the "l4d_projectile_hittable.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: txt l4d_projectile_hittable.phrases.txt (2.4 KB, 226 views)
    File Type: sp Get Plugin or Get Source (l4d_projectile_hittable.sp - 238 views - 54.7 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:18.
    Marttt is offline
    mikaelangelis
    Senior Member
    Join Date: Oct 2017
    Old 10-13-2020 , 09:03   Re: [L4D1 & L4D2] Projectile Shotable [v1.0.0 | 12-October-2020]
    Reply With Quote #2

    well I was misled by the title. Was expecting that you could mimic projectile of all bullets from hitscan. But nice plugin
    mikaelangelis is offline
    Shao
    Senior Member
    Join Date: Jan 2015
    Old 10-30-2020 , 13:34   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.1 | 16-October-2020]
    Reply With Quote #3

    If I may suggest, would it be possible to create a quick burn radius when the molotov gets hit so it's not wasted? Kind of like how the Bilejar works, but have the effect happening under the harmless visual that happens in midair so that anything close to it takes burn.

    Often where players toss a molotov at a tank from close, it gets accidently shot with the effects lost entirely.
    Shao is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 10-30-2020 , 14:01   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.1 | 16-October-2020]
    Reply With Quote #4

    I can make a cvar enabling back the molotov to burn the "ground", the only problem is during my tests, after you hit the Molotov, it instantly creates an inferno on the ground. Depending on how high the Molotov is, seems a bit unrealistic.

    Do you think it fits what you want?
    __________________
    Marttt is offline
    Shao
    Senior Member
    Join Date: Jan 2015
    Old 10-30-2020 , 15:56   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.1 | 16-October-2020]
    Reply With Quote #5

    Could work, though what I meant was;

    Is it possible to turn the area where the molotov gets shot into a explosion that deals fire damage so that anyone close to the radius gets set on fire, notably specials. Kinda like how the grenade launcher with incendiary ammo works, setting stuff on fire but doesn't leave fire on the floor.

    However the effect of fire should be that of the molotov where it doesn't extinguish like incendiary ammo so it can be compatible with plugins like silvers burn duration; https://forums.alliedmods.net/showthread.php?p=2672640

    Because if we use the grenade launcher incendiary, stuff extinguishes pretty fast.

    Last edited by Shao; 10-30-2020 at 15:58.
    Shao is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 10-31-2020 , 01:12   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.2 | 31-October-2020]
    Reply With Quote #6

    Try this new version. You can control the delay of fire spots through the "l4d_projectile_hittable_molotov_delay" new cvar.

    Isn't exactly what you asked for, it still will leave fire on the floor, but maybe is better than the previous one.

    Code:
    Change Log:
    
    1.0.2 (31-October-2020)
        - Added cvar to delay the fire spots generated by molotovs.
    __________________

    Last edited by Marttt; 10-31-2020 at 01:42.
    Marttt is offline
    strikeraot
    Senior Member
    Join Date: Dec 2018
    Location: Viet Nam
    Old 11-21-2020 , 09:34   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.2 | 31-October-2020]
    Reply With Quote #7

    Can this plugin work with Weapon Drop?
    Ex: I throw a pipebomb with sm_drop command far away then use sniper, zoom and shoot at it, it should explode, similar to molotov and vomitjar.

    Last edited by strikeraot; 11-21-2020 at 09:38.
    strikeraot is offline
    Manoa
    Junior Member
    Join Date: Jul 2012
    Old 01-20-2021 , 21:54   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.4 | 31-December-2020]
    Reply With Quote #8

    is it possible to turn the pipe into a grenade ? to blow when it hitting something ?
    Manoa is offline
    FroGeX
    Senior Member
    Join Date: Aug 2020
    Old 01-24-2021 , 05:55   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.5 | 22-January-2021]
    Reply With Quote #9

    this would be good for CSGO
    FroGeX is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 01-26-2021 , 00:20   Re: [L4D1 & L4D2] Projectile Hittable [v1.0.5 | 22-January-2021]
    Reply With Quote #10

    Unfortunately, I don't play CSGO to support it and probably won't work removing the game check.
    But the core logic should be similar to a good CSGO dev adapt it.
    __________________
    Marttt is offline
    Reply


    Thread Tools
    Display Modes

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


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