View Single Post
Author Message
redjazz96
Junior Member
Join Date: Jul 2013
Old 07-02-2013 , 21:51   [TF2] Dispenser Music (v0.4.1, 2014-05-02)
Reply With Quote #1

Adds music to any dispensers built.

Features
  • Handles hooking music events to dispenser entities
  • Picks a song by random
  • Figures out song time
  • Plays songs
  • !dispenser command for players to determine if they want their dispenser to play music

This plugin requires the Sound Info Library!

CVARs/Commands
Spoiler


Changelog

Code:
2014-05-02 (v0.4.1)
* Adds !dispenser command
* Allows songs to be put on rotation

2014-04-22 (v0.3.0)
* Cleans up the configuration file
* Music plays on dispenser creation
* Removes limit on number of sounds

2013-06-09 (v0.2.0)
* Adds a configuration file in sourcemod/configs/dispenser_music.cfg to list music
* Binds the music to the location of the dispenser

2013-06-02 (v0.1.1)
* Removes debug calls.
* Moves callback from OnMapStart to OnConfigsExecuted
* Removes load on plugin start

2013-06-02 (v0.1.0)
* Initial release.
Install
  1. Place the .smx file in the plugins folder.
  2. Create a file called dispenser_music.cfg in sourcemod/configs.
  3. Fill it with your songs. Example:
    Spoiler

    Each entry (the key for the entry doesn't matter) must contain a "file" key, which points to the file relative to the sound directory (in the tf folder).
  4. If you want the plugin to play other sounds when the current one finishes, you must place the sounds in the server's sound directory
  5. Run sm plugins load dispenser_music

Plans
  • Allow volume to be set for the songs.
  • Remove the limit on the number of songs the plugin can handle. (done!)
  • Make specifying sound directories easier. This is gonna be done by adding a configuration file to the server so sounds can be specified. (done!)

New video (Old video)

Is my first plugin!
Attached Files
File Type: sp Get Plugin or Get Source (dispenser_music.sp - 768 views - 7.3 KB)
File Type: smx dispenser_music.smx (8.5 KB, 1179 views)

Last edited by redjazz96; 05-04-2014 at 13:46. Reason: update to 0.4.1
redjazz96 is offline