SA-MP Forums Archive
How to make a song into audio stream - 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: How to make a song into audio stream (/showthread.php?tid=630990)



How to make a song into audio stream - Satish1 - 21.03.2017

Hey guys i want to ask a little help i know the code to put in pawno for audio stream here is the song https://www.youtube.com/watch?v=dLdIx0epx3U i want to convert it on an audio stream so it can play on my samp server anyone help me please?


Re: How to make a song into audio stream - X337 - 21.03.2017

I use http://www.*******inmp3.com/ in my server to stream audio from *******.
Код:
Play*******Song(playerid, *******[])
{
	new link[128];
	format(link, 128, "http://www.*******inmp3.com/fetch/?video=%s", *******);
	PlayAudioStreamForPlayer(playerid, link);
}



Re: How to make a song into audio stream - Satish1 - 21.03.2017

Quote:
Originally Posted by X337
Посмотреть сообщение
I use http://www.*******inmp3.com/ in my server to stream audio from *******.
Код:
Play*******Song(playerid, *******[])
{
	new link[128];
	format(link, 128, "http://www.*******inmp3.com/fetch/?video=%s", *******);
	PlayAudioStreamForPlayer(playerid, link);
}
NO bro i mean when player will be connecting in my server they will hear the song and you know when you enter a ******* link it does not play so how i can do it bro?


Re: How to make a song into audio stream - X337 - 21.03.2017

Use that function under OnPlayerConnect.
Код:
public OnPlayerConnect(playerid)
{
	Play*******Song(playerid, "https://www.*******.com/......");
	// ... Your code
}



Re: How to make a song into audio stream - Satish1 - 21.03.2017

Quote:
Originally Posted by X337
Посмотреть сообщение
I use http://www.*******inmp3.com/ in my server to stream audio from *******.
Код:
Play*******Song(playerid, *******[])
{
	new link[128];
	format(link, 128, "http://www.*******inmp3.com/fetch/?video=%s", *******);
	PlayAudioStreamForPlayer(playerid, link);
}
Quote:
Originally Posted by X337
Посмотреть сообщение
Use that function under OnPlayerConnect.
Код:
public OnPlayerConnect(playerid)
{
	Play*******Song(playerid, "https://www.*******.com/......");
	// ... Your code
}
Oh ok ty but how to put on player spawn stop it and how can i make a cmd of it to play and stop??


Re: How to make a song into audio stream - X337 - 21.03.2017

Use this function to stop the stream audio https://sampwiki.blast.hk/wiki/StopAudioStreamForPlayer. Put them under OnPlayerSpawn callback and in stop music command.
And use that Play*******Song function in your play music command.


Re: How to make a song into audio stream - Satish1 - 21.03.2017

Quote:
Originally Posted by X337
Посмотреть сообщение
Use this function to stop the stream audio https://sampwiki.blast.hk/wiki/StopAudioStreamForPlayer. Put them under OnPlayerSpawn callback and in stop music command.
And use that Play*******Song function in your play music command.
Ok thx bro


Re: How to make a song into audio stream - Satish1 - 21.03.2017

@x337 how can i make a cmd that ******* song play with a cmd and stop with a cmd?


Re: How to make a song into audio stream - coool - 21.03.2017

Quote:
Originally Posted by Satish1
Посмотреть сообщение
@x337 how can i make a cmd that ******* song play with a cmd and stop with a cmd?
I am using zcmd and sscanf. You have to enter the website url of song
PHP код:
CMD:play(playeridparams[])
{
    new 
song[40];
    if(!
sscanf(paramss[40], song)) //Seeing if the params is string.
    
{
         
Play*******Song(playeridsong); //Then using the function of X337
    
}
    else 
SCM(playerid, -1"USE: play [Song url]"); //else if the param isn't string send the following message.
    
return 1;
}
CMD:stop(playerid)
{
    
StopAudioStreamForPlayer(playerid); //This function to stop the audio (self describing)
    
return 1;




Re: How to make a song into audio stream - crukk11 - 21.03.2017

Play*******Song must be foward?

Sorry nubis