AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Noise Maker Player (https://forums.alliedmods.net/showthread.php?t=142791)

jouva 11-09-2010 19:59

[TF2] Noise Maker Player
 
2 Attachment(s)
Noise Maker Player
Version 2.3.1

Description
Just because the noise makers aren't available for purchase anymore, it doesn't mean you can't enjoy the noise makers still. Simple to use, easy to annoy!

Use the sm_noisemaker command to pull up a menu and choose which type of sound pack you wish to play. All sound packs have a set of different sounds that will randomly be chosen to play.

Other commands:
  • sm_noisemaker_halloween for just sounds from the Scream Fortress update
  • sm_noisemaker_samurai for just sounds from the Shogun Pack
  • sm_noisemaker_japan for just sounds from the Japan Charity Bundle
  • sm_noisemaker_fireworks for just sounds from the Summer Camp Sale fireworks noise maker (accepts no parameters)
  • sm_noisemaker_birthday for just sounds from the TF Birthday noise maker (accepts no parameters)
  • sm_noisemaker_vuvuzela for just sounds from the Vuvuzela noise maker (accepts no parameters)
  • sm_noisemaker_winter for just sounds from the Winter Holiday noise maker (accepts no parameters)
Please note: If you are updating from a previous version and are having issues, please change the map before reporting any bugs. An update usually only happens when new noise makers have been released. As such, translation files will have changed and SourceMod will not reload them until the server's map has been changed.

sm_noisemaker and other commands (except where noted above) can optionally accept one parameter. 0 will play a random noise maker. Any other number plays the respective noise maker as listed in the command's menu.

Note: This IS using content Valve made with an intent to earn profit from. However, the items are no longer available in the store, or have been given out for free and should hopefully be ok by Valve. If a Valve employee does show concern over using this content, I will immediately discontinue this plugin and urge all server owners to uninstall it thereafter. I will also urge owners to remove (or disable, when the option is put in) the plugin if they continue to sell the items.

Installation
Extract the .zip file into your sourcemod directory. For updates, unload and reload the plugin. Any updates including new language files will be marked as such. Any updates w/o language files will only need a new .sp/.smx file.

Cvars

  • sm_noisemaker_version - Pretty obvious. Don't touch. :P
  • sm_noisemaker_delay - Delay in seconds between uses (Default: 5)
  • sm_noisemaker_nodelayflag - Anyone with flags specified in this cvar are immune to the above delay (Default: "")
Updates
  • Version 2.3.1 (2013-03-06)
    • Fixed bug causing array out of bounds when using sm_noisemaker 16 or 17
  • Version 2.3.0 (2011-12-23)
    • Added Winter Holiday noise maker
    • Added French translations
  • Version 2.2.0 (2011-10-21)
    • Added Vuvuzela noise maker
    • Fixed long standing bug where players were not properly told they need to wait before using the commands again
  • Version 2.1.1 (2011-08-29)
    • Included proper particle effect for TF Birthday noise maker
    • Changed randomization code to make choice of any noise from any noise maker much more random. Was choosing random pack #1-5 (e.g, Halloween, Samurai) before choosing sound. Now it chooses random sound #1-15 (e.g, Black cat, Birthday, Gong)
  • Version 2.1.0 (2011-08-24)
    • Added Fireworks and TF Birthday noise makers
    • Fixed a few translations in Spanish translation file
  • Version 2.0.0 (2011-04-26)
    • Reverted back to menu from panel due to larger amount of noise maker items
    • Added Shogun and Japan Charity noise makers
    • Fixed Spanish translation file
    • Added individual commands for each noisemaker pack (sm_noisemaker_halloween, sm_noisemaker_samurai, sm_noisemaker_japan)
  • Version 1.2.0 (2010-11-18)
    • Changed menu to panel. No more exit, but now no more "Next/Prev" either
    • sm_noisemaker now accepts numbers (0-8) as a parameter. 0 will play a random noise maker. 1-8 plays the respective noise maker as listed in the menu
    • sm_noisemaker now has "Random" as a choice
    • No longer precaches sounds in OnPluginLoad()
    • Multilingual support (en and es included in this release)
  • Version 1.1.1 (2010-11-10)
    • Plugin now precaches sounds on plugin load and map load
  • Version 1.1.0 (2010-11-10)
    • Some minor code rearranging
    • Plugin now precaches sounds only on plugin load instead of every time
    • Players now have the "Halloween Note" particle effect attached when using the noise maker. Cloaked spies will not display it
    • Added cool down time between uses. Defaults to 5 seconds. Root flag "z" is always immune
    • Stabby now has 3 sounds based on pitch
  • Version 1.0.0 (2010-11-09)
    • Initial release
Special Thanks
Thanks to EnigmatiK and Jindo for their plugins (Melee Dare and False Messages) which I used to make a lot of this code. Also thanks to DarthNinja for contributing code for sm_noisemaker to accept parameters.

psychonic 11-09-2010 20:25

Re: [TF2] Noise Maker Player
 
Quote:

Originally Posted by jouva (Post 1346313)
If a Valve employee does show concern over using this content, I will immediately discontinue this plug-in and urge all server owners to uninstall it thereafter. I will also urge owners to remove (or disable, when the option is put in) the plug-in if they continue to sell the items.

If a Valve employee does show concern over using this content, I will immediately reupload this plug-in and urge all server owners to install it thereafter. I will also urge owners to install (or enable, when the option is put in) the plug-in if they continue to sell the items.

jouva 11-09-2010 20:43

Re: [TF2] Noise Maker Player
 
lolol I see what you did there. I'm just trying to say that I don't want to get Valve mad at us or me just like they did with hats. Though I'm pretty sure they didn't exactly see the noise makers as a get rich quick scheme, or got everybody a nice pay raise cause of it, but it IS specifically material that did earn them money.

pheadxdll 11-09-2010 21:16

Re: [TF2] Noise Maker Player
 
There's also a particle system effect when you play a sound, I say make it exactly like the real deal. If Valve gets upset, they can always make those sounds unplayable. :gyar:

Couple things, admin/cooldown would be nice, plus why don't you precache all the files at once and then look at the menu_item index to determine which one to play. You'd save some unnecessary string conversions. Other than that, good job, I knew someone would make something like this.

jouva 11-09-2010 21:41

Re: [TF2] Noise Maker Player
 
Quote:

Originally Posted by pheadxdll (Post 1346349)
There's also a particle system effect when you play a sound, I say make it exactly like the real deal. If Valve gets upset, they can always make those sounds unplayable. :gyar:

Couple things, admin/cooldown would be nice, plus why don't you precache all the files at once and then look at the menu_item index to determine which one to play. You'd save some unnecessary string conversions. Other than that, good job, I knew someone would make something like this.

Sounds like some good ideas! What is the exact particle effect? I've not seen it in person.

FlaminSarge 11-09-2010 22:25

Re: [TF2] Noise Maker Player
 
sm_play @all Halloween.stabby
So much fun :D
And it uses playgamesound...
Why not use it?

jouva 11-09-2010 22:38

Re: [TF2] Noise Maker Player
 
Would it change how it gets emitted? Cause I'm pretty sure that the noise makers would be emitted and not be heard all over the map or by all players.

McFlurry 11-10-2010 00:48

Re: [TF2] Noise Maker Player
 
I agree with getting the correct particles to appear when used*cough, cough* halloween_notes *cough, cough*

jouva 11-10-2010 01:20

Re: [TF2] Noise Maker Player
 
Working on this stuff right now. Also FYI, it looks like valve was going to make a "Spooky" item, but it never got sold. So it's an added bonus.

Also going to update the text for the names. Should have something tonight or tomorrow.

jouva 11-10-2010 01:50

Re: [TF2] Noise Maker Player
 
Little update already: Looks like most of this is working just fine. But 2 questions.

1) Does anybody know if the particle effect lasted for a set amount of time or was it dependent upon the length of the sound

2) For those that code: is there an easy way for me to make a menu that doesn't have "next" and shows all 8 items? I tried MENU_NO_PAGINATION but that doesn't seem to do it and it's ONLY 8 items.


All times are GMT -4. The time now is 01:11.

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