How can I turn off the sound? - 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: How can I turn off the sound? (
/showthread.php?tid=607597)
How can I turn off the sound? -
CasHiis - 21.05.2016
Hi everybody!
I want to play is 6000 sound id.
6000 - Blast door sliding
http://samp-sound.do.am/SOUNDS_1/SOU...OOP_2_6000.mp3
However, there is no end.
I search stop id sound, but not find out.
Can anybody help me?
Re: How can I turn off the sound? -
Konstantinos - 21.05.2016
If you set it with PlayAudioStreamForPlayer, then use StopAudioStreamForPlayer to stop it.
Re: How can I turn off the sound? -
iKevin - 21.05.2016
Create a timer and run it for example 4000 miliseconds because thats the length of the mp3 file then call a StopAudioStreamForPlayer function to stop it in that timer.
Re: How can I turn off the sound? -
CasHiis - 21.05.2016
I don't like stop the player other sounds (music, radio) I would like to play with PlayerPlaySound.
https://sampwiki.blast.hk/wiki/PlayerPlaySound
Re: How can I turn off the sound? -
Konstantinos - 21.05.2016
Perhaps if you set an invalid soundid to PlayerPlaySound?
Re: How can I turn off the sound? -
CasHiis - 21.05.2016
I try it.
But the PlayerPlaySound function does not stop the previous playback.
Edit: Thanks! It worked!
Re: How can I turn off the sound? -
justjamie - 21.05.2016
SetTimerEx(StopAudioStreamForPlayer, 2000, 0, "d", playerid);