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

Loading Song Advanced (Updated Thread)


Post New Thread Reply   
 
Thread Tools Display Modes
Guenhwyvar
AMX Mod X Beta Tester
Join Date: Jul 2005
Location: Berlin / Germany
Old 01-14-2007 , 13:21   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #381

As most of the people around here know: this plugin is a mess.

I got no 100% working version until today.

The following "solution" isn't really one, but it's the way I use the plugin.

1) Take compatible mp3 formats (I use Cool Edit to cut'n'save, only stereo/8or16bit/22or44khz/48-96kbit)
2) I put every song twice in the loadingsongs.ini (but this doesn't fixes the problem of not playing a song every time a user connects)
3) I use ~10 loadingsongs. This minimizes the bug mentiones in 2) to a risk of 1:10 not playing a song (and after some months: it's ok if it doesn't play the music sometimes)
4) Using this version (out of this thread, but Iam to lazy to refer, so here it's again):
Quote:
#include <amxmodx>
#include <amxmisc>

#define MAX_SONGS 50

public plugin_init() {
register_plugin("loading with music","1.0","eFrigid")
return PLUGIN_CONTINUE
}

new configsdir[200]
new configfile[200]
new song[MAX_SONGS][64]
new songdir[MAX_SONGS][64]
new bool:precached[MAX_SONGS]


public plugin_precache()
{
get_configsdir(configsdir,199)
format(configfile,199,"%s/loadingsongs.ini",configsdir)
new trash
for(new i=0;i<MAX_SONGS;i++)
{
precached[i]=false
read_file(configfile,i,song[i],63,trash)
if(!equali(song[i][4],""))
{
precached[i]=true
format(songdir[i],63,"misc/%s",song[i])
precache_sound(songdir[i])
}
}
}

public client_connect(id) {
for(new i=0;i<MAX_SONGS;i++)
client_cmd(0,"mp3 play sound/misc/%s",song[i])
return PLUGIN_HANDLED
}
Guenhwyvar is offline
ZodiacMindwarp
Member
Join Date: Jul 2004
Location: Ventura, CA
Old 01-14-2007 , 17:50   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #382

Quote:
Originally Posted by jopmako View Post
yeah,many people camplain the sound can't play sometime.

i got the way...try this
edit from arkshine post.
2 think fixed,work for me.

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #define MAX_SONGS 50   public plugin_init(){    register_plugin("loading with music","2.0","eFrigid") }   new configsdir[200] new configfile[200] new song[MAX_SONGS][64] new songdir[MAX_SONGS][64] new bool:precached[MAX_SONGS]   public plugin_precache(){    get_configsdir(configsdir,199)    format(configfile,199,"%s/loadingsongs.ini",configsdir)    new trash    for(new i=0;i<MAX_SONGS;i++)    {       precached[i]=false       read_file(configfile,i,song[i],63,trash)       if(!equali(song[i][4],""))       {          precached[i]=true          format(songdir[i],63,"sound/misc/%s",song[i])          precache_generic(songdir[i])       }    } }   public client_connect(id){    set_task(0.2,"delay_play",id) // delay play, fixed saometime can't play problem    return PLUGIN_CONTINUE }   public delay_play(id) {    new size = file_size(configfile,1)    new rsong = random_num(0,size-1)    new cursong[64], a    read_file(configfile,rsong,cursong,63,a)    //client_cmd(id,"mp3 play sound/misc/%s",cursong)    client_cmd(id,"mp3 loop sound/misc/%s",cursong) // loop play, fixed sometime load too long and sound stoped }
I used this along with the "non-3" version and it works perfectly with Mp3's. No use in bangin you head against the wall for something that doesnt work, this does.

[ 18] loading with music 2.0 eFrigid loadingsongadva running

Amxmodx 1.76c
Metamod 1.19p28
Linux HLDS
Natural Selection 3.1.3

I have 3 servers running this plugin, no problems. (2) Linux and (1) Windows

Z
__________________


RichNet.tv NS:COMBAT:SoCal[RNT]
12.191.247.153:27015
RichNet.tv NS:MvM:SoCal[RNT]
12.191.247.154:27015
RichNet.tv Quake III HeadHunters SoCal[RNT]
66.254.94.10:27960

Last edited by ZodiacMindwarp; 01-14-2007 at 17:57.
ZodiacMindwarp is offline
Send a message via AIM to ZodiacMindwarp
Guenhwyvar
AMX Mod X Beta Tester
Join Date: Jul 2005
Location: Berlin / Germany
Old 01-15-2007 , 14:11   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #383

Zodiac, don't get me wrong if ask this ;).
Assuming you have more than three loadingsong-mp3s installed?
Are you really sure the plugin cycles through all of the mp3s configured and is it playing a mp3 on every connect (you should've connected more than 50 times to be sure)?

Just want to be sure before updating to your version on the servers. Anyway, thanx for the hint.
Guenhwyvar is offline
ZodiacMindwarp
Member
Join Date: Jul 2004
Location: Ventura, CA
Old 01-16-2007 , 02:42   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #384

Quote:
Originally Posted by pl2003 View Post
Zodiac, don't get me wrong if ask this ;).
Assuming you have more than three loadingsong-mp3s installed?
Are you really sure the plugin cycles through all of the mp3s configured and is it playing a mp3 on every connect (you should've connected more than 50 times to be sure)?

Just want to be sure before updating to your version on the servers. Anyway, thanx for the hint.
I can tell you that I presently have 8 Mp3's all at about 2min in full length that play randomly every time and are precached from our fast url downloads site perfectly. Now, before I used the delay loop method I have indicated there were some problems with songs not playing every time or playing one song continuously rather then the other songs on the list. I could not get version 3 to work this is why I use version 2. If you dont believe me feel free to connect to any of my servers listed in my signature as many times as you like to see. Dont get me wrong, I feel your frustration, as I was really grasping at straws to get verison 3 to work and until the delay loop method for version 2 came along I was thinking if I was really going to be able to get this plugin to work reliably. This works, I am on these servers every day.

Z
__________________


RichNet.tv NS:COMBAT:SoCal[RNT]
12.191.247.153:27015
RichNet.tv NS:MvM:SoCal[RNT]
12.191.247.154:27015
RichNet.tv Quake III HeadHunters SoCal[RNT]
66.254.94.10:27960

Last edited by ZodiacMindwarp; 01-16-2007 at 02:52.
ZodiacMindwarp is offline
Send a message via AIM to ZodiacMindwarp
BladeWolf
New Member
Join Date: Jan 2007
Old 01-27-2007 , 17:43   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #385

Where do I put the sv_downloadurl config??? Or..do I just type it in server console?

Last edited by BladeWolf; 01-27-2007 at 17:48.
BladeWolf is offline
Send a message via AIM to BladeWolf Send a message via MSN to BladeWolf
deejay87
Senior Member
Join Date: Apr 2004
Location: Pays du Glaude - France
Old 01-27-2007 , 18:13   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #386

in server.cfg
__________________
deejay87 is offline
Send a message via MSN to deejay87 Send a message via Skype™ to deejay87
*GcW* EN!/4L/4T(+)R
Junior Member
Join Date: Jan 2007
Old 04-13-2007 , 04:36   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #387

I'm hearing the songs and am curious about this response I'm getting in server console when you join? Has this failure any ideas something I should adjust? Just curious, thanks.

BUILD 3647 SERVER (0 CRC)
Server # 1
* Privileges set
Error: server failed to transmit file 'sound/sound/misc/serverintro.mp3'
Error: server failed to transmit file 'sound/sound/misc/zikmu1.mp3'
Error: server failed to transmit file 'sound/sound/misc/zikmu3.mp3'
Error: server failed to transmit file 'sound/sound/misc/Oakenfold.mp3'
Error: server failed to transmit file 'sound/sound/misc/Pale3.mp3'
Error: server failed to transmit file 'sound/sound/misc/dropweapon.mp3'
Error: server failed to transmit file 'sound/sound/misc/JunorReactor.mp3'
Error: server failed to transmit file 'sound/sound/misc/Marylin.mp3'
Missing RIFF/WAVE chunks
Missing RIFF/WAVE chunks
Missing RIFF/WAVE chunks
Missing RIFF/WAVE chunks
Missing RIFF/WAVE chunks
Missing RIFF/WAVE chunks
Missing RIFF/WAVE chunks
*GcW* EN!/4L/4T(+)R is offline
Send a message via AIM to *GcW* EN!/4L/4T(+)R Send a message via MSN to *GcW* EN!/4L/4T(+)R
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 04-13-2007 , 05:40   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #388

YOu could be missing those songs from the server to distribute. (I.E. their not in the right place, or their not their at all)

And where the hell are you frigid? I see you on irc every now and again, but never here or anything.... lol C'mon
__________________
bmann_420 is offline
deejay87
Senior Member
Join Date: Apr 2004
Location: Pays du Glaude - France
Old 04-13-2007 , 06:47   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #389

what do you have put in loadingsounds.ini ?

'sound/sound...... << this is your probleme
__________________
deejay87 is offline
Send a message via MSN to deejay87 Send a message via Skype™ to deejay87
The ever lasting noob
New Member
Join Date: May 2007
Old 05-10-2007 , 11:46   Re: Loading Song Advanced (Updated Thread)
Reply With Quote #390

Hi all!

I have problem with this loading song plugin. It will download the song from server but doesnt play it :/ i'm confused so if somebody could please help me with this problem. THANKS!
The ever lasting noob 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 01:12.


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