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

[Any] Smoke Bomb!


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
1908
Plugin Version:
2.1.0
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    15 
    Plugin Description:
    Vanish like a ninja!
    Old 08-24-2010 , 04:28   [Any] Smoke Bomb!
    Reply With Quote #1

    [Any] Smoke Bomb
    Version 2.1.0




    Description:
    Give players smoke bombs/grenades in any game!
    When activated a large cloud of smoke appears around the player.
    See below for settings!

    Screenshots:
    (Random colors): | Pic 1 | Pic 2 |

    Commands:
    Client:
    sm_smokebomb - uses 1 smokebomb
    Admin:
    sm_givesmoke <client> <quantity> - sets <client>'s number of bombs to <quantity>.

    Cvars:
    sm_smokebomb_version -- plugin version

    Settings:
    sm_smokecolorhandler "1" - Changes smoke color processing, 1 = default color set in sm_smokecolor, 2 = team colors, 3 = random colors.
    sm_smokecolor "255 255 255" - sets the RGB color mix of the smoke. (default color is white)
    sm_smokecolor_team2 "255 0 0" - Smoke color for Team2 (default color is red)
    sm_smokecolor_team3 "0 0 255" - Smoke color for Team3 (default color is blue)
    sm_smoketime "8" - How long the smoke lasts in seconds.
    sm_smoketrans "255" - Smoke transparency 0 to 255.
    sm_smokedensity "30" - How thick/how much smoke is created.
    sm_smokecarry "3" - How many smoke bombs a player can carry at a time. Returning to a resupply grants more bombs.
    New! sm_smoke_helptext_handler - Sets how text is displayed, 0 = all text is shown, 1 = pickup text is hidden, 2 = pickup and use texts are hidden, 3 = pickup, use, and out of bombs texts are hidden. Text from the admin command is always shown to the player/admin.

    Teams Color Cvars:
    TF2 TeamIDs: Red = Team 2, Blue = Team 3 | CS:S TeamIDs: T = 2 CT = 3
    Note! Team color cvars are only used if sm_smokecolorhandler is set to "2"

    Install Instructions:
    1. Place SmokeBomb.smx into your addons/sourcemod/plugins/ folder.

    Notes:
    I used strontiumdog's Gas Plugin as an example to work from, so credit/thanks to him for that.

    Disclaimer: The bombs produce very thick smoke which is somewhat expensive to render. Spamming lots of smoke in the same area will cause FPS drops, so don't use a ton of it!

    You can set the smoke color to "0 0 0" and have an epic black smoke monster, although the black smoke really kills FPS for some reason.


    ToDo:
    • Done! Less spammy texty (cvar)
    • Done! Don't print text if player picks up 0 bombs
    • Bomb cooldown



    Version History:
    • V1.0.0
      • Initial Release
    • V1.1.0
      • Added sm_givesmoke
    • V2.0.0
      • Added more smoke options:
        • Normal: all one color; default=white
        • Team: red/blue, can be changed via cvars
        • Random: Random color for each smoke (blatantly stolen from strontiumdog's gas plugin)
      • Fixed bug with givesmoke command text printing wrong value to client
      • Added reply text to admin command
      • Fixed support for non-tf2 games (I hope).
    • V2.1.0
      • Added a cvar to change how much the plugin prints to chat
      • Fixed it printing to chat when player's "picked up" 0 bombs.
    Attached Files
    File Type: sp Get Plugin or Get Source (SmokeBomb.sp - 3510 views - 8.3 KB)
    __________________

    Last edited by DarthNinja; 10-29-2011 at 04:56.
    DarthNinja is offline
    Searcher64
    Senior Member
    Join Date: Apr 2010
    Old 08-24-2010 , 07:42   Re: [Any] Smoke Bomb!
    Reply With Quote #2

    Quote:
    Returning to a resupply
    Resupply? I don't see any command here that is able to produce an object that lets players resupply their smoke bombs, though it would be cool.......
    Searcher64 is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 08-24-2010 , 08:43   Re: [Any] Smoke Bomb!
    Reply With Quote #3

    looks great
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    IronWarrior
    Veteran Member
    Join Date: Jan 2010
    Old 08-24-2010 , 13:26   Re: [Any] Smoke Bomb!
    Reply With Quote #4

    Would this work for L4D2?
    IronWarrior is offline
    dannyowan
    Senior Member
    Join Date: Mar 2005
    Old 08-24-2010 , 15:06   Re: [Any] Smoke Bomb!
    Reply With Quote #5

    Quote:
    03:06:29 L 08/25/2010 - 03:25:16: [SM] Native "HookEvent" reported: Game event "post_inventory_application" does not exist
    03:06:29 L 08/25/2010 - 03:25:16: [SM] Displaying call stack trace for plugin "SmokeBomb.smx":
    03:06:29 L 08/25/2010 - 03:25:16: [SM] [0] Line 35, /home/groups/alliedmodders/forums/files/4/9/8/6/5/72246.attach::OnPluginStart()
    dannyowan is offline
    MarshalZCC
    Senior Member
    Join Date: Feb 2010
    Location: Alberta, Canada
    Old 08-24-2010 , 22:27   Re: [Any] Smoke Bomb!
    Reply With Quote #6

    post_inventory_application is a TF2 event. I don't think this will work with any other game without adjustments.
    MarshalZCC is offline
    dannyowan
    Senior Member
    Join Date: Mar 2005
    Old 08-25-2010 , 01:21   Re: [Any] Smoke Bomb!
    Reply With Quote #7

    Quote:
    Originally Posted by MarshalZCC View Post
    post_inventory_application is a TF2 event. I don't think this will work with any other game without adjustments.
    yup, I have tested in dods that doesn't work
    dannyowan is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 08-25-2010 , 05:04   Re: [Any] Smoke Bomb!
    Reply With Quote #8

    Woah, I didn't expect this to be so popular :/

    Searcher64:
    By resupply I meant a TF2 resupply locker.

    IronWarrior:
    Should do.
    Let me know

    dannyowan & MarshalZCC:
    Yeah, post_inventory_application is TF2 only, I didn't think about it, I'll update it so it uses player_spawn as well.

    cybersquare420:
    I can add some cvars to allow for team colors.
    __________________
    DarthNinja is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 08-25-2010 , 07:33   Re: [Any] Smoke Bomb!
    Reply With Quote #9

    ~Updated~

    • V2.0.0
      • Added more smoke options:
        • Normal: all one color; default=white
        • Team: red/blue, can be changed via cvars
        • Random: Random color for each smoke (blatantly stolen from strontiumdog's gas plugin)
      • Fixed bug with givesmoke command text printing wrong value to client
      • Added reply text to admin command
      • Fixed support for non-tf2 games (I hope).
    __________________
    DarthNinja is offline
    cybersquare420
    Veteran Member
    Join Date: Nov 2008
    Old 08-24-2010 , 23:14   Re: [Any] Smoke Bomb!
    Reply With Quote #10

    nice idea. would be kinda cool it the smoke was team colored... just to pretty it up a bit... but im gonna give it a try anyhow


    edit: works well... it spams the chat a bit much... maybe a cvar to disable some of the chat spam... and i would really like the smoke team colored.... but im sure i can accomplish both of those myself... when i get the time and the oh so important motivation... lol
    __________________

    Last edited by cybersquare420; 08-24-2010 at 23:53.
    cybersquare420 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 10:30.


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