Problem plugin Music

This is the dedicated forum for RemoteCP4: the web based dedicated server control script.

Moderators: hal|Sascha, TM-Patrol

Post Reply
User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Problem plugin Music

Post by DarK » 20 Nov 2009 10:45

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 ?

User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Re: Problem plugin Music

Post by DarK » 22 Nov 2009 14:36

Anybody can help me !!?? :(

User avatar
hal|Sascha
Pit Crew
Pit Crew
Posts: 671
Joined: 12 Aug 2005 16:22
Owned TM-games: TMU, TMN, TMS, TMO
Location: Germany Munich
Contact:

Re: Problem plugin Music

Post by hal|Sascha » 23 Nov 2009 09:41

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.
CPU: Intel Core 2 Duo E6600
Mainboard: Asus P5W DH Deluxe
RAM: 2 GB
Graphics: ATI Radeon X1950XTX
Audio: Soundblaster Audigy 4
Internet: ADSL 6Mbit
OS: Windows Vista Bussiness

User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Re: Problem plugin Music

Post by DarK » 23 Nov 2009 09:48

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 !?

User avatar
hal|Sascha
Pit Crew
Pit Crew
Posts: 671
Joined: 12 Aug 2005 16:22
Owned TM-games: TMU, TMN, TMS, TMO
Location: Germany Munich
Contact:

Re: Problem plugin Music

Post by hal|Sascha » 23 Nov 2009 12:49

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 :)
CPU: Intel Core 2 Duo E6600
Mainboard: Asus P5W DH Deluxe
RAM: 2 GB
Graphics: ATI Radeon X1950XTX
Audio: Soundblaster Audigy 4
Internet: ADSL 6Mbit
OS: Windows Vista Bussiness

User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Re: Problem plugin Music

Post by DarK » 23 Nov 2009 13:10

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 ??

User avatar
hal|Sascha
Pit Crew
Pit Crew
Posts: 671
Joined: 12 Aug 2005 16:22
Owned TM-games: TMU, TMN, TMS, TMO
Location: Germany Munich
Contact:

Re: Problem plugin Music

Post by hal|Sascha » 24 Nov 2009 09:52

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 :)
CPU: Intel Core 2 Duo E6600
Mainboard: Asus P5W DH Deluxe
RAM: 2 GB
Graphics: ATI Radeon X1950XTX
Audio: Soundblaster Audigy 4
Internet: ADSL 6Mbit
OS: Windows Vista Bussiness

User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Re: Problem plugin Music

Post by DarK » 24 Nov 2009 11:01

The modification work fine. Thanks.
But it'is possible to change music automatically when the map change ?

corto-72
smooth traffic navigator
smooth traffic navigator
Posts: 284
Joined: 28 Jul 2008 16:12
Owned TM-games: TMUF
Location: Toulouse
Contact:

Re: Problem plugin Music

Post by corto-72 » 24 Nov 2009 13:38

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...

User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Re: Problem plugin Music

Post by DarK » 24 Nov 2009 14:31

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 ?

corto-72
smooth traffic navigator
smooth traffic navigator
Posts: 284
Joined: 28 Jul 2008 16:12
Owned TM-games: TMUF
Location: Toulouse
Contact:

Re: Problem plugin Music

Post by corto-72 » 24 Nov 2009 16:20

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...

User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Re: Problem plugin Music

Post by DarK » 24 Nov 2009 20:37

Ok but I haven't onEndChallenge in the index.php !! :ftw:

corto-72
smooth traffic navigator
smooth traffic navigator
Posts: 284
Joined: 28 Jul 2008 16:12
Owned TM-games: TMUF
Location: Toulouse
Contact:

Re: Problem plugin Music

Post by corto-72 » 25 Nov 2009 00:17

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));   }
}

User avatar
hal|Sascha
Pit Crew
Pit Crew
Posts: 671
Joined: 12 Aug 2005 16:22
Owned TM-games: TMU, TMN, TMS, TMO
Location: Germany Munich
Contact:

Re: Problem plugin Music

Post by hal|Sascha » 25 Nov 2009 10:16

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
CPU: Intel Core 2 Duo E6600
Mainboard: Asus P5W DH Deluxe
RAM: 2 GB
Graphics: ATI Radeon X1950XTX
Audio: Soundblaster Audigy 4
Internet: ADSL 6Mbit
OS: Windows Vista Bussiness

User avatar
DarK
cyclist
cyclist
Posts: 38
Joined: 23 Oct 2008 19:24
Owned TM-games: tmnf
Location: France

Re: Problem plugin Music

Post by DarK » 25 Nov 2009 19:28

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...

Post Reply