SA-MP Forums Archive
Problem with a Song. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with a Song. (/showthread.php?tid=342218)



Problem with a Song. - x96664 - 13.05.2012

Hello,
I've wanted to set a song as sound while the players are choosing their Class but I have met a problem.
The song is from *******.com and doesn't loads, any link from ******* doesn't works.Why ?
Код:
public OnPlayerConnect(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://www.youtube.com/watch?v=Yg-RIOATCbU&ob=av2n");
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	StopAudioStreamForPlayer(playerid);
	return 1;
}
Can anyone help me to fix it ?


Re: Problem with a Song. - huhander - 13.05.2012

Cuz the audiostream plays MP3 file, not *******!


Re: Problem with a Song. - JaKe Elite - 13.05.2012

PlayAudioStream only supports MP3/Wave files not *******


Re: Problem with a Song. - x96664 - 13.05.2012

Quote:
Originally Posted by huhander
Посмотреть сообщение
Cuz the audiostream plays MP3 file, not *******!
Quote:
Originally Posted by Romel
Посмотреть сообщение
PlayAudioStream only supports MP3/Wave files not *******
Ok can You give me a website where I can upload songs and all to be able to listen them as radio with .pls file.


Re: Problem with a Song. - huhander - 13.05.2012

Made ur own webhost, like altervista or something like that, and upload it on the website root, so you will have a
http://www.yoursite.doming.com/the_name_of_the_song.mp3


Re: Problem with a Song. - RedWingz - 13.05.2012

Try this:

pawn Код:
.   (Ignore this dot)
   
    }
    if(strcmp("/radio", cmdtext, true, 10) == 0)
    {
        PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1177953");
        SendClientMessage(playerid, COLOR_GREEN, "You are now listening to the Vocal Trance Radio!");
        SendClientMessage(playerid, COLOR_RED, "Type /stopradio to turn off the radio!");
        return 1;
    }
    if(strcmp("/stopradio", cmdtext, true, 10) == 0)
    {
        StopAudioStreamForPlayer(playerid);
        SendClientMessage(playerid, COLOR_GREEN, "You have turned the radio off!");
        return 1;
    }
Hope it helped.
Btw, If you want a different audio stream, then goto www.shoutcast.com

P.S. I Scripted this. ;]


Re: Problem with a Song. - x96664 - 13.05.2012

Thank you for the help i fixed the problem.


Re: Problem with a Song. - RedWingz - 13.05.2012

Your welcome.