playeraudiosteam link help? - 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: playeraudiosteam link help? (
/showthread.php?tid=367021)
playeraudiosteam link help? -
N0FeaR - 08.08.2012
Trying to make so you can put in URL link
pawn Код:
if(dialogid == 1339)
{
if(PlayerInfo[playerid][pAdministrator] >= 4)
{
new Float:aX, Float:aY, Float:aZ;
GetPlayerPos(playerid, aX, aY, aZ);
pawn Код:
else if(listitem == 5)
{
if(IsPlayerInAnyVehicle(playerid))
{
//SetPVarInt(playerid, "aURLrange");
ShowPlayerDialog(playerid, 1339, DIALOG_STYLE_INPUT, "Audio URL", "Enter Audio URL", "OK", "Cancel");
}
Respuesta: playeraudiosteam link help? -
[DOG]irinel1996 - 08.08.2012
Mmm.. I didn't understand very well, what are you trying to do? Type a stream URL in a dialog and play it?
Re: playeraudiosteam link help? -
N0FeaR - 08.08.2012
Right, stream URL in a dialog.
Respuesta: playeraudiosteam link help? -
[DOG]irinel1996 - 08.08.2012
I just done this, give a try:
pawn Код:
if(strcmp(cmd, "/stream", true) == 0)
{
ShowPlayerDialog(playerid,1996,DIALOG_STYLE_INPUT,"Audio Streaming","Type the URL below:","Play","Exit");
//http://k002.kiwi6.com/hotlink/732x86iw28/transformation.mp3 <-- Tested with this URL.
return 1;
}
//-----------------//
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1996) {
if(response) {
new url[128];
format(url,128,"%s",inputtext);
PlayAudioStreamForPlayer(playerid,url);
}
return 1;
}
return 1;
}
It worked for me.
Re: Respuesta: playeraudiosteam link help? -
N0FeaR - 08.08.2012
Quote:
Originally Posted by irinel1996
I just done this, give a try:
pawn Код:
if(strcmp(cmd, "/stream", true) == 0) { ShowPlayerDialog(playerid,1996,DIALOG_STYLE_INPUT,"Audio Streaming","Type the URL below:","Play","Exit"); //http://k002.kiwi6.com/hotlink/732x86iw28/transformation.mp3 <-- Tested with this URL. return 1; }
//-----------------// public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 1996) { if(response) { new url[128]; format(url,128,"%s",inputtext); PlayAudioStreamForPlayer(playerid,url); } return 1; } return 1; }
It worked for me.
|
Thanks buddy, i will try this.