SA-MP Forums Archive
Need help with PlayAudioStreamForPlayer. - 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: Need help with PlayAudioStreamForPlayer. (/showthread.php?tid=413749)



Need help with PlayAudioStreamForPlayer. - Desi_Dude - 06.02.2013

Hello,
I need help with URL streaming system, I would like players to stream the Audio by themselves with their own URL.

Код:
else if(listitem == 3)
	        {
	        	if(GetPVarType(playerid, "pBoomBox"))
				{
				    foreach(Player, i)
					{
						if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pBoomBoxArea")))
						{
							PlayAudioStreamForPlayer(i, "((here))", GetPVarFloat(playerid, "pBoomBoxX"), GetPVarFloat(playerid, "pBoomBoxY"), GetPVarFloat(playerid, "pBoomBoxZ"), 30.0, 1);
				  		}
				  	}
			  		SetPVarString(playerid, "pBoomBoxStation", "((Here is where is want the streamed URL to be))");
				}
				else
				{
				    PlayAudioStreamForPlayer(playerid, "((Here))");
				    SetPVarInt(playerid, "MusicIRadio", 1);
				}
			}



Re: Need help with PlayAudioStreamForPlayer. - Scenario - 06.02.2013

Basically, use a DIALOG_STYLE_INPUT dialog and put the code you currently have under the response for that ID. Where you have things like ((here)) or whatever, replace it with: inputtext


Re: Need help with PlayAudioStreamForPlayer. - Desi_Dude - 06.02.2013

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Basically, use a DIALOG_STYLE_INPUT dialog and put the code you currently have under the response for that ID. Where you have things like ((here)) or whatever, replace it with: inputtext
Oh i get it, but where excatly do i out this command?

Код:
ShowPlayerDialog( playerid, 9885, DIALOG_STYLE_INPUT, "Stream","Please enter your custom URL.", "Stream", "Cancel" );
Код:
ShowPlayerDialog(playerid,RADIO,DIALOG_STYLE_LIST,"Radio Menu","Song1\nSong2\nSong3\n((HERE))\nOff","Select", "Close");



Re: Need help with PlayAudioStreamForPlayer. - Desi_Dude - 09.02.2013

Bump..Can anyone help me aswell as explain to me , How can i merge them ?I had a look at wiki of SA-MP , but Im not getting anything from it , I'm really confused.


Re: Need help with PlayAudioStreamForPlayer. - Desi_Dude - 09.02.2013

Bump , it's on second page :/


Re: Need help with PlayAudioStreamForPlayer. - Misiur - 09.02.2013

pawn Код:
ShowPlayerDialog(playerid,RADIO,DIALOG_STYLE_LIST,"Radio Menu","Song1\nSong2\nSong3\n((HERE))\nOff","Select", "Close");
Now, onDialogResponse if the listitem is equal 3 you need to show next dialog which will be dialog with an input
pawn Код:
ShowPlayerDialog( playerid, 9885, DIALOG_STYLE_INPUT, "Stream","Please enter your custom URL.", "Stream", "Cancel" );
And then you use inputtext as an url


Re: Need help with PlayAudioStreamForPlayer. - Desi_Dude - 09.02.2013

I didn't really catch that up , Can you explain with some example ? , I've tried looking everywhere ,