This plugin makes the clients download a custom mp3 on connect and an admin with vote flag can play it by chat command:
!thebestthing
Based on ([L4D/Any?] Map (round) Start Music Player (infinite tracks)) by
Dragokas and
Harry Potter
Preperation:
You will need a webserver to host the mp3, you will prolly have one, take the one that is hosting your motd for example.
Create an mp3 encoded in 44100 Hz sample rate, otherwise it may not play at all.
See attached file in zip file for testing. (Use testfile it works 100%)
In server.cfg allowdownload and set path to DL folder:
PHP Code:
sm_cvar sv_allowdownload "1"
sm_cvar sv_downloadurl "http://your-content-server.com/game/left4dead/"
Create a folder in:
PHP Code:
http://your-content-server.com/game/left4dead/
called sound
and in there another folder called random
PHP Code:
http://your-content-server.com/game/left4dead/sounds/random
Put the testfile there.
Manually check if downloadable from:
PHP Code:
http://your-content-server.com/game/left4dead/sound/random/thebestthing.mp3
Compile l4d_thebestthing.sp and place l4d_thebestthing.smx into sourcemod/plugins folder.
If all went well you should connect to the server, the client downloads the mp3 and if you are admin with ADMFLAG_VOTE you can play that file via chat !thebestthing
Allied Modders is the best thing since sliced bread.
Take it as a statement.
Have Fun!
p.s. Just like all the other plugins messing with the download table it makes players with a MAC crash. Well better get a real computer anyways.
p.p.s the client will only DL the file once, so if you change it, only new players get the new version, so if you change it, you might wanna use a different mp3 name.