Raised This Month: $ Target: $400
 0% 

[L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Earendil
Member
Join Date: Jan 2020
Location: Spain
Plugin ID:
7652
Plugin Version:
1.1
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    9 
    Plugin Description:
    AWP and Scout bullets explode on impact.
    Old 05-25-2021 , 19:42   [L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]
    Reply With Quote #1

    This plugin was made by request.

    Description
    When AWP and Scouts shoots, when the bullet hits an obstacle or a body, it will explode. Explosion is created using an env_explosion and will have assigned as owner the player who shooted it so enemies hurted or killed by explosion will be asigned to a player, witches can be harassed and will follow the correct player. Any zombie damaged by explosion will be stunned (tanks included), gascans, propane tanks and oxygen will be afected, even alarm cars can be triggered by the explosion, so players should be careful.

    Bullet is not destroyed when it explodes, but it will generate an explosion once, when it hits is first obstacle.

    Explosion damage and radius can be modified with ConVars.

    ConVars
    PHP Code:
    // If set to 1 Scout will cause explosions too.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_explawp_allow_scout "1"

    // Max damage of the explosion.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "1000.000000"
    l4d2_explawp_damage "100"

    // Max explosion damage caused to survivors.
    // -
    // Default: "15"
    // Minimum: "0.000000"
    l4d2_explawp_damage_friendly "15"

    // 0 = Plugin off, 1 = Plugin on.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_explawp_enable "1"

    // Enable the plugin in these gamemodes, separated by spaces. (Empty = all).
    // -
    // Default: ""
    l4d2_explawp_gamemodes ""

    // Explosion radius override (16 units = 1 foot). If set to 0 radius will be proportional to damage.
    // -
    // Default: "0"
    // Minimum: "0.000000"
    // Maximum: "8000.000000"
    l4d2_explawp_radius "0" 
    Changelog
    Code:
    * v1.0 (26-May-21)
      - First release.
    
    * v1.0.1 (26-May-21)
      -Fixed bug in gamemode plugin ConVar (thanks to Silvers for the advice).
      - Fixed bug that allowed minigun shots become explosive while using AWP or Scout (thanks to HarryPotter for the bug report).
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_explosiveawp.sp - 332 views - 9.1 KB)

    Last edited by Earendil; 07-01-2021 at 06:32. Reason: Updated to v1.1
    Earendil is offline
    TrueDarkness
    Junior Member
    Join Date: May 2021
    Old 05-26-2021 , 02:06   Re: [L4D2] Explosive AWP and Scout bullets(v1.0)[26-May-21]
    Reply With Quote #2

    Cool~ Can you do that for other snipers? like Military Sniper and Hunting Sniper
    TrueDarkness is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 05-26-2021 , 02:54   Re: [L4D2] Explosive AWP and Scout bullets(v1.0)[26-May-21]
    Reply With Quote #3

    If someone puts "versus" for the gamemodes cvar the plugin would enable on "coopversus" or "versusscavenge" for example. That's why in my plugins I separate by commas and append a comma to the start and end of the current mode and search for that within the cvar string which also has a comma at start and end. You could search using spaces instead of commas. Currently it's not strict and "coop" would enable for all sorts of mutations using "coop" in the name.
    __________________
    Silvers is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: TW
    Old 06-30-2021 , 12:06   Re: [L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]
    Reply With Quote #4

    Report a bug,
    when player holds a AWP and uses minigun, all the bullets from minigun explode on impact.
    so you have to check if a player is using a mounted weapon in Event_Bullet_Impact function.
    PHP Code:
    /**
     * Returns whether player is using a mounted weapon.
     *
     * @param client        Client index.
     * @return                True if using a mounted weapon, false otherwise.
     * @error                Invalid client index.
     */
    stock bool L4D_IsPlayerUsingMountedWeapon(int client)
    {
        return 
    view_as<bool>(GetEntProp(clientProp_Send"m_usingMountedWeapon"));

    __________________

    Last edited by HarryPotter; 06-30-2021 at 12:06.
    HarryPotter is offline
    Earendil
    Member
    Join Date: Jan 2020
    Location: Spain
    Old 07-01-2021 , 06:29   Re: [L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]
    Reply With Quote #5

    Quote:
    Originally Posted by HarryPotter View Post
    Report a bug,
    when player holds a AWP and uses minigun, all the bullets from minigun explode on impact.
    so you have to check if a player is using a mounted weapon in Event_Bullet_Impact function.
    Thank you, I didn't noticed that, updated!
    Earendil is offline
    AI0702
    Junior Member
    Join Date: Apr 2021
    Old 07-12-2021 , 14:51   Re: [L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]
    Reply With Quote #6

    Modified the original plugin to cover all 4 snipers, with convars for each.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_explosiveawp.sp - 124 views - 10.2 KB)
    AI0702 is offline
    dahyun4220
    Member
    Join Date: Sep 2021
    Old 09-20-2021 , 01:51   Re: [L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]
    Reply With Quote #7

    Can you change all guns into explosive bullets?
    dahyun4220 is offline
    DrDarkTempler
    Member
    Join Date: Apr 2012
    Old 09-28-2021 , 13:10   Re: [L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]
    Reply With Quote #8

    Hey Earendil, this plugin is nice, but there is one suggestion i want to make, since AWP with explosive is pretty overpowering, i was wondering if you can have an option to disable stunned tank just to balance the game out a bit?

    Thanks!
    DrDarkTempler is offline
    ddd123
    Member
    Join Date: May 2021
    Old 06-30-2022 , 02:38   Re: [L4D2] Explosive AWP and Scout bullets(v1.0.1)[26-May-21]
    Reply With Quote #9

    Quote:
    Originally Posted by DrDarkTempler View Post
    Hey Earendil, this plugin is nice, but there is one suggestion i want to make, since AWP with explosive is pretty overpowering, i was wondering if you can have an option to disable stunned tank just to balance the game out a bit?

    Thanks!
    Same, I would also like to disable stun for Tank otherwise i can perma stun the Tank by spamming fire
    (I know this is 1 years old suggestion but i also need it)

    Last edited by ddd123; 06-30-2022 at 02:38.
    ddd123 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 12:04.


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