Need help with PlayAudioStreamForPlayer.
#1

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

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

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");
Reply
#4

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

Bump , it's on second page :/
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)