SA-MP Forums Archive
on audiostreamend, startaudiostream over and over again? - 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: on audiostreamend, startaudiostream over and over again? (/showthread.php?tid=345568)



on audiostreamend, startaudiostream over and over again? - niels44 - 25.05.2012

hey guys,

is it possible to make it like when a song with PlayAudioStreamForPlayer ends that automaticcaly there starts a new song? liek a function called:
OnPlayerAudioStreamEnd(playerid, stream.....)
{
RestartAudioStreamForPlayer(playerid, stream.....);
return 1;
}

is there a function familiar to this? cuz i would LOVE it

greets niels


Re: on audiostreamend, startaudiostream over and over again? - SuperViper - 25.05.2012

There's no way to do this unless you know the length of the song. I've already made a function for this in svAddons, which will be released soon.


Re: on audiostreamend, startaudiostream over and over again? - vIBIENNYx - 25.05.2012

You could make a stock, which would end the first song after X amount of time and start song 2, then end song 2 after X amount of seconds and start 3, etc.


Re: on audiostreamend, startaudiostream over and over again? - MP2 - 25.05.2012

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
There's no way to do this unless you know the length of the song. I've already made a function for this in svAddons, which will be released soon.
But even so, there's a buffer time.


Re: on audiostreamend, startaudiostream over and over again? - niels44 - 25.05.2012

hmm yeah, but that will be VERY much timers isnt it? or very much variables..., also my question 2 is is there a StopPlayerSound? to stop the PlayerPlaySound function? cuz its getting really annoying when playing 1 hour GTA an you constant hear that damn song XD


Re: on audiostreamend, startaudiostream over and over again? - Rob_Maate - 25.05.2012

What song? You mean your stream? Yes there's a callback to stop that. If you're talking about inbuilt sounds, unfortunately no.


Re: on audiostreamend, startaudiostream over and over again? - niels44 - 25.05.2012

, im talking about PlayerPlaySound(playerid, soundid);

not audiostream... and why there aint a stop for it? that sucks man there should be func for that


Re: on audiostreamend, startaudiostream over and over again? - MP2 - 25.05.2012

You can stop the music ones with the ID+1, and most of the others with 0 (or -1 I forget).