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

[CS:GO] Exploding grenades (dropped ones)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ImACow
AlliedModders Donor
Join Date: Feb 2015
Plugin ID:
5849
Plugin Version:
1.0.0
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    When dropped grenades get damages they explode.
    Old 10-02-2017 , 13:20   [CS:GO] Exploding grenades (dropped ones)
    Reply With Quote #1

    Small little release.

    Noticed there has been a few of these around, but they all have a flaw somewhere somehow.

    Any grenade which is dropped on the ground, will explode when taking damage.

    ConVars:
    • sm_exploding_grenades_enabled (default: 1) [bool] (0/1) Enable / disable exploding grenades plugin

    Enjoy
    Attached Files
    File Type: sp Get Plugin or Get Source (ExplodingGrenades.sp - 843 views - 3.0 KB)
    __________________

    Last edited by ImACow; 10-02-2017 at 14:13.
    ImACow is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 10-02-2017 , 14:30   Re: [CS:GO] Exploding grenades (dropped ones)
    Reply With Quote #2

    Did some clean up to make it look neater and shorter.
    Usually you should only define new functions to either move large chunks of code that is hard to understand, or if you want to use that chunk of code else where. This plugin is so small there's no real need to make helper functions.
    I've also renamed the enabled ConVar and removed the unused defines.
    Also the mix of bracket styles was throwing me off while reading, and ended up changing them all to something i'm familiar with looking at.
    Attached Files
    File Type: sp Get Plugin or Get Source (ExplodingGrenades.sp - 625 views - 2.0 KB)
    Mitchell is offline
    ImACow
    AlliedModders Donor
    Join Date: Feb 2015
    Old 10-02-2017 , 15:01   Re: [CS:GO] Exploding grenades (dropped ones)
    Reply With Quote #3

    Agreed it looks better for "experienced" programmers,
    I coded it this way as "learning" materials for others.
    __________________

    Last edited by ImACow; 10-02-2017 at 15:57.
    ImACow is offline
    Sandervraun
    Senior Member
    Join Date: May 2019
    Location: Denmark
    Old 08-08-2020 , 14:02   Re: [CS:GO] Exploding grenades (dropped ones)
    Reply With Quote #4

    It no longer explodes.. It is broken now. Update destroyed it
    Sandervraun is offline
    Sandervraun
    Senior Member
    Join Date: May 2019
    Location: Denmark
    Old 08-16-2020 , 07:45   Re: [CS:GO] Exploding grenades (dropped ones)
    Reply With Quote #5

    L 08/16/2020 - 13:43:21: [SM] Exception reported: Client index -1 is invalid
    L 08/16/2020 - 13:43:21: [SM] Blaming: explodedroppedgrenades.smx
    L 08/16/2020 - 13:43:21: [SM] Call stack trace:
    L 08/16/2020 - 13:43:21: [SM] [0] GetClientTeam
    L 08/16/2020 - 13:43:21: [SM] [1] Line 72, C:\Users\Jimi\Desktop\SourcePawn\CSGO\Unfinis hed\explodedroppedgrenades.sp::CS_CreateExplo sion
    L 08/16/2020 - 13:43:21: [SM] [2] Line 60, C:\Users\Jimi\Desktop\SourcePawn\CSGO\Unfinis hed\explodedroppedgrenades.sp::OnGrenadeTakeD amage
    L 08/16/2020 - 13:43:21: [SM] Exception reported: Client index -1 is invalid
    L 08/16/2020 - 13:43:21: [SM] Blaming: explodedroppedgrenades.smx
    L 08/16/2020 - 13:43:21: [SM] Call stack trace:
    L 08/16/2020 - 13:43:21: [SM] [0] GetClientTeam
    L 08/16/2020 - 13:43:21: [SM] [1] Line 72, C:\Users\Jimi\Desktop\SourcePawn\CSGO\Unfinis hed\explodedroppedgrenades.sp::CS_CreateExplo sion
    L 08/16/2020 - 13:43:21: [SM] [2] Line 60, C:\Users\Jimi\Desktop\SourcePawn\CSGO\Unfinis hed\explodedroppedgrenades.sp::OnGrenadeTakeD amage
    Sandervraun is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 08-16-2020 , 07:57   Re: [CS:GO] Exploding grenades (dropped ones)
    Reply With Quote #6

    Update to the latest SourceMod build.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami 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 19:36.


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