Raised This Month: $51 Target: $400
 12% 

Loading Music (easy to use directory version)


Post New Thread Reply   
 
Thread Tools Display Modes
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 09-23-2007 , 18:06   Re: Loading Music (easy to use directory version)
Reply With Quote #31

Quote:
Originally Posted by redvsblue View Post
could you add something in order to PLAYERS write "intro" in chat and loading sound it's played.
It could be done... but I probably won't. The way it is now, it randomly picks a song for each player. In other words, each player could be hearing a different song. I would either have to change it so each player hears the same song, or that it keeps track of which song each player heard.

Besides, there are already plugins that let players listen to mp3s while they play. Search for "jukebox" to find a few.
__________________
Get maps at http://www.counter-strike-maps.net
Shoot me at:

AndraX2000 is offline
IKIP
Junior Member
Join Date: Nov 2007
Location: Connecticut, USA
Old 01-27-2008 , 12:32   Re: Loading Music (easy to use directory version)
Reply With Quote #32

Nice Job!

I spent a few hours trying to get the other plugin (the one with the loadingsongs.ini) to work and trying all the modifications done in an attempt to fix it as well. Bottom line.....Never worked. In fact, it would freeze the server at times. So I saw a link to yours and voila, first attempt it worked like a charm!

Two thumbs UP!
__________________
[IKIP]IKumInPeace Klan.....WeKumInPeace
IKIP is offline
Send a message via AIM to IKIP
bootervijay
New Member
Join Date: May 2008
Old 05-08-2008 , 00:20   Re: Loading Music (easy to use directory version)
Reply With Quote #33

I have modified with the capacity of 20 songs
Attached Files
File Type: sma Get Plugin or Get Source (loadingsounddir.sma - 841 views - 3.6 KB)
bootervijay is offline
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 05-08-2008 , 09:50   Re: Loading Music (easy to use directory version)
Reply With Quote #34

Quote:
Originally Posted by bootervijay View Post
I have modified with the capacity of 20 songs
A word of caution for those who want a higher song capacity: The plugin precaches all of the songs in the directory up to Maxsounds. This means that when a new player connects to the server, they will be forced to download all of the precached songs (in bootervijay's case, 20 songs). Many players may not have the patience for that. If your sever does not depend on new players, and your regulars are OK with it then that's fine.

Why does it precache all of the songs? Sometimes the Steam client won't play the song the first time it downloads. If you only precache one song per round, then there will be many rounds where the music doesn't play. By precaching them all at once, this guarantees only one round where it might not play.

A further caution for everyone: Any plugin that uses precache_* has the potential to crash your server when certain maps are loaded. There is a limit to the number of objects that a map can have. If the map is very close to this limit, and then you try to precache more objects, it may go over the limit, crashing the server. Increasing the number of songs you precache increases this risk, so be wary doing this if you have a lot of custom maps.
__________________
Get maps at http://www.counter-strike-maps.net
Shoot me at:

AndraX2000 is offline
Saturn SL1-WNY
Junior Member
Join Date: Dec 2004
Old 05-20-2008 , 20:44   Re: Loading Music (easy to use directory version)
Reply With Quote #35

I am using this 'framework' as a base for something else I am working on, similar to what I was doing before (and subsequently losing all of my files), AndraX, I just wanted to let you know.

I will keep you posted, because it could be a big boost for this plugin, thanks for putting this together as it is, it is exactly what I was looking for.

All I have done at the moment anyways is clean up the code since it appeared all over the place in pawn studio (junk), renamed some variables to a coding standard, and moved the MP3 storage directory to a constant at the top, should anyone wish to store their MP3s in an anternate location.

As for the fellow who is precaching 20 mp3s, good luck.

What I was considering attempting to do, via database probably since that is how I am operating, is rotating "chunks" of MP3s, if you want more than some definable number, so that different MP3s will precache on different maps.

Keeping this number low would discourage folks from disconnecting due to downloading 50 wav files they don't need, custom models, decals, and other frivolous junk that tends to accumulate.

Not all MP3s would play if you don't have them, obviously, so this initially looks like a poor choice.

The next item on the list (or maybe the other way around since block precache isn't a top priority), for me anyways, is selectable on join MP3. I already have setup a plugin to track players who join by ID, their last play time, and allow them to "register" (does nothing much useful yet), allowing them to use other features in the server. I would simply extend the database to allow a preference in loading music to be selected, for those who desired it, and the plugin would simply tell the client to play whatever MP3 file that happened to be when they joined.

I was figuring, since I am going to use local DB, the latency would be low enough to pull the filename on join and send it out, and if you didn't have a preference, or weren't registered, then you would simply get the general mp3 that always precaches, that everyone hears anyways.

What do you think?
__________________
Partycat.US
-------------
Si, por el amor de dios.
Saturn SL1-WNY is offline
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 05-31-2008 , 11:17   Re: Loading Music (easy to use directory version)
Reply With Quote #36

Quote:
Originally Posted by Saturn SL1-WNY View Post
... renamed some variables to a coding standard, and moved the MP3 storage directory to a constant at the top, should anyone wish to store their MP3s in an alternate location.
Both good ideas.

Quote:
Originally Posted by Saturn SL1-WNY View Post
What I was considering attempting to do, ... is rotating "chunks" of MP3s ... so that different MP3s will precache on different maps.
Not all MP3s would play if you don't have them, obviously, so this initially looks like a poor choice.
You could choose to only select a MP3 out of the current chunk, to guarantee that the player will have the file. Also keep in mind that Steam frequently does not play the file when it is first downloaded, so each new chunk will be a round where the player does not hear the music.

Quote:
Originally Posted by Saturn SL1-WNY View Post
The next item on the list ... is selectable on join MP3.
That seems cool.

When you're done coding, post here to let me and other know. I don't think it will be a replacement for this plugin, but it will be a useful addition to the spectrum of loading music plugins. Mine offers simplicity, EFrigid's offers complex server-level control through .ini, and yours will offer player-level control though DB.
__________________
Get maps at http://www.counter-strike-maps.net
Shoot me at:

AndraX2000 is offline
Cerobug
Member
Join Date: Jun 2008
Old 06-22-2008 , 18:32   Re: Loading Music (easy to use directory version)
Reply With Quote #37

Ok I downloaded this and put it in my server. I put the song into the loading folder inside of sound/misc in my condition zero folder. The plugin will download and precache the song but when you connect to the server it only plays the old cz loading songs. I have tested the mp3 using the console and it played just fine it just will not play for anyone when they connect after downloading the song. Any idea on how to fix this?
Cerobug is offline
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 06-22-2008 , 23:34   Re: Loading Music (easy to use directory version)
Reply With Quote #38

Unfortunately, I don't play CZ so I am not able to test the plugin for that game. I have only vetted it on CS 1.6, although others have said it works with other games. My guess is that perhaps CZ doesn't allow the server to force a client to issue the "mp3 play" command.

If any of my colleagues who play CZ could help Cerobug, it would be appreciated.
__________________
Get maps at http://www.counter-strike-maps.net
Shoot me at:

AndraX2000 is offline
AngelWing
New Member
Join Date: Jul 2008
Old 07-02-2008 , 07:32   Re: Loading Music (easy to use directory version)
Reply With Quote #39

nice
AngelWing is offline
mullekurden
Member
Join Date: Apr 2008
Old 07-04-2008 , 02:58   Re: Loading Music (easy to use directory version)
Reply With Quote #40

i added this plugin to my server because i have a lot of models to load and then if there is music on while loading they will definitely not go to another server instead of loading mine...

i tried to delete all models i had loaded from my steamaccount and connect to the server...

first i had to load my loadingsound and then all the models but after i loaded the loadingsound it didn't start? if i want the loadingsound to be played i must reconnect and load all models and then the loadingsound will work.


please can you make that after loading the sound that it reconnects or that the sound starts emediatly after downloading.

__________________

mullekurden 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 20:56.


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