AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Smoke Bomb! (https://forums.alliedmods.net/showthread.php?t=136216)

DarthNinja 08-24-2010 04:28

[Any] Smoke Bomb!
 
1 Attachment(s)
[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.

Searcher64 08-24-2010 07:42

Re: [Any] Smoke Bomb!
 
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.......

sinblaster 08-24-2010 08:43

Re: [Any] Smoke Bomb!
 
looks great

IronWarrior 08-24-2010 13:26

Re: [Any] Smoke Bomb!
 
Would this work for L4D2?

dannyowan 08-24-2010 15:06

Re: [Any] Smoke Bomb!
 
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()

MarshalZCC 08-24-2010 22:27

Re: [Any] Smoke Bomb!
 
post_inventory_application is a TF2 event. I don't think this will work with any other game without adjustments.

cybersquare420 08-24-2010 23:14

Re: [Any] Smoke Bomb!
 
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

dannyowan 08-25-2010 01:21

Re: [Any] Smoke Bomb!
 
Quote:

Originally Posted by MarshalZCC (Post 1281053)
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

DarthNinja 08-25-2010 05:04

Re: [Any] Smoke Bomb!
 
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 :wink:

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 08-25-2010 07:33

Re: [Any] Smoke Bomb!
 
~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).


All times are GMT -4. The time now is 05:21.

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