Page 1 of 1

Problem plugin Music

Posted: 20 Nov 2009 10:45
by DarK
Hi

I have a problem with the plugin music.
My server run with remotecp 4.0.3.2 . I configured the file setting.xml and I enable the plugin music.
But I don't have any music on my server. My songs are all in .mux.
What can I do ?

Re: Problem plugin Music

Posted: 22 Nov 2009 14:36
by DarK
Anybody can help me !!?? :(

Re: Problem plugin Music

Posted: 23 Nov 2009 09:41
by hal|Sascha
Hi Dark,

How does your settings.xml looks like?
The <file> field musst contain a web-url, it's currently not possible to use locally hosted files.

Re: Problem plugin Music

Posted: 23 Nov 2009 09:48
by DarK
Yes, all my files are hosted on free.fr and work great.
The link is good also I don't understand why I haven't any music on my server.
Perhaps because the musics are in .mux !?

Re: Problem plugin Music

Posted: 23 Nov 2009 12:49
by hal|Sascha
DarK wrote:Yes, all my files are hosted on free.fr and work great.
The link is good also I don't understand why I haven't any music on my server.
Perhaps because the musics are in .mux !?
Just to clear everything out, you know that you have to type /music to open the music player? (don't want to bother you, but had some simliar problem last week. People might think the rcp music stuff works like aseco's forceMusic implementation, but thats not the case)

Have you asked somebody else if the music works?

If all fails, could you send me 1 or 2 of your mux file URL's by PM, so I can try them with my server? Could possibly be a bug, never tested it with mux that good, I allways prefered ogg files :)

Re: Problem plugin Music

Posted: 23 Nov 2009 13:10
by DarK
Ok it work.
I did not know that I had to write /music in chat but I have a question.
What is that people are going to hear the music by connecting to the server or have to activate the music by typing /music ??

Re: Problem plugin Music

Posted: 24 Nov 2009 09:52
by hal|Sascha
DarK wrote:Ok it work.
I did not know that I had to write /music in chat but I have a question.
What is that people are going to hear the music by connecting to the server or have to activate the music by typing /music ??
Yes everybody has to type /music to open the music panel.

You could try to replace the onNewPlayer fuction inside /live/Music/index.php by this code:

Code: Select all

	public function onNewPlayer($player)
	{
		$window = $player->ManiaFWK->addWindow('MLMusic', 'Music Player', -61.5, -45.25, 35);
		if($window) {
			$window->setOption('header', false);
			$window->setOption('close', false);
			$window->setOption('static', true);
			$window->setOption('bg', false);
		}

		$this->onMLAMusicSetFlag($player, 'open', true);
		$this->onMLAMusicSetFlag($player, 'play', true);
		$this->onMLAMusicSetFlag($player, 'trackid', 1);
		$this->onMLMusic(array($player));
	}
This should open the music panel on player join and play track #1
Haven't tested it its just a idea, but should work :)

Re: Problem plugin Music

Posted: 24 Nov 2009 11:01
by DarK
The modification work fine. Thanks.
But it'is possible to change music automatically when the map change ?

Re: Problem plugin Music

Posted: 24 Nov 2009 13:38
by corto-72
I think if you add

Code: Select all

public function onBeginChallenge()
{
	if(empty(Core::getObject('players')->players)) return;
	foreach(Core::getObject('players')->players AS $player)
	{
		$this->onMLAMusicCT(array($player,1));
	}
}
to the same file it should work...

Re: Problem plugin Music

Posted: 24 Nov 2009 14:31
by DarK
Thanks I just added:

Code: Select all

$this->onMLAMusicCT(array($player,1));
And it works perfectly. The music change automatically with the map but is it possible to stop the music when comes the moment of the podium ?

Re: Problem plugin Music

Posted: 24 Nov 2009 16:20
by corto-72
not near my setup to try it but I guess you need to add in the onBeginChallenge, after the previous mod:

Code: Select all

      $this->onMLAMusicSetFlag($player, 'play', true);
     $this->onMLMusic(array($player));
and in onEndChallenge

Code: Select all

      $this->onMLAMusicSetFlag($player, 'play', false);
      $this->onMLMusic(array($player));
Be sure to do that for all players...

Re: Problem plugin Music

Posted: 24 Nov 2009 20:37
by DarK
Ok but I haven't onEndChallenge in the index.php !! :ftw:

Re: Problem plugin Music

Posted: 25 Nov 2009 00:17
by corto-72
Add this then

Code: Select all

public function onEndChallenge()
{
   if(empty(Core::getObject('players')->players)) return;
   foreach(Core::getObject('players')->players AS $player)
   {
      $this->onMLAMusicSetFlag($player, 'play', false);
      $this->onMLMusic(array($player));   }
}

Re: Problem plugin Music

Posted: 25 Nov 2009 10:16
by hal|Sascha
nice work guys!
I did nearly the same yesterday after Dark asked here :)

Its the music plugin for the 4.0.3.4 update, but should work with 4.0.3.3/2 (not sure with 4.0.3.2 :oops: )
http://www.file-upload.net/download-203 ... c.zip.html

Re: Problem plugin Music

Posted: 25 Nov 2009 19:28
by DarK
Yes don't work with remotecp 4.0.3.2
I have this error

Code: Select all

Fatal error: Call to a member function add() on a non-object in C:\xampp\htdocs\
www\remotecp\live\Music\index.php on line 25
Appuyez sur une touche pour continuer...