How to make a song into audio stream
#1

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?
Reply
#2

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);
}
Reply
#3

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?
Reply
#4

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

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??
Reply
#6

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

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
Reply
#8

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

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;

Reply
#10

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

Sorry nubis
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)