SA-MP Forums Archive
Having trouble with PlayAudioStream - 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: Having trouble with PlayAudioStream (/showthread.php?tid=313046)



Having trouble with PlayAudioStream - willsuckformoney - 24.01.2012

I'm just now getting to scripting with the new functions and i have a problem. I have this code:
pawn Код:
if(dialogid == 10001)
    {
        new Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,X,Y,Z);
        if(!response) return PlayAudioStreamForPlayer(playerid,"http://translate.******.com/translate_tts?tl=en&q=Goodbye",X,Y,Z,13,1);
        //
    }
It doesn't work. It wont play the audio stream.. Anyone know whats wrong?


Re: Having trouble with PlayAudioStream - [HK]Ryder[AN] - 24.01.2012

It's not a direct link .The URL plays the stream from somewhere else.To play you have to get a direct link which is a .mp3 or a .pls in the end.
Also you are playing it when the user cancels the dialog unless you want this to play when he cancels it.


Re: Having trouble with PlayAudioStream - willsuckformoney - 24.01.2012

Fixed it, the code worked. I just had the radio sound off.