SA-MP Forums Archive
Detect the end of an audio stream? - 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: Detect the end of an audio stream? (/showthread.php?tid=295142)



Detect the end of an audio stream? - sciman001 - 05.11.2011

Hi. I was just wonderingm is it possible to detect the end of a player streamed audio? I do NOT want to use the "time" method... if you know what i mean... By that, I mean, I do not want to check if however long has passed... like...
Код:
if time has passed
{
     variable = 1
}
I want something like this:
Код:
public OnAudioStreamStop(playerid)
{
     if(streaming[playerid] == 1)
     {
          streaming[playerid] = 0;
     }
}
Or something like that. I do have that streaming variable in my script so that players cant play 2 or more songs at the same time. :P Anyway, can anyont let me know about this please? Thanks!


Re: Detect the end of an audio stream? - Calgon - 05.11.2011

No, there's no callbacks or any way of checking whether the stream has ended yet. You can always suggest it as a new feature for 0.3d's final release though.