How can I turn off the sound?
#1

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?
Reply
#2

If you set it with PlayAudioStreamForPlayer, then use StopAudioStreamForPlayer to stop it.
Reply
#3

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.
Reply
#4

I don't like stop the player other sounds (music, radio) I would like to play with PlayerPlaySound.

https://sampwiki.blast.hk/wiki/PlayerPlaySound
Reply
#5

Perhaps if you set an invalid soundid to PlayerPlaySound?
Reply
#6

I try it.
But the PlayerPlaySound function does not stop the previous playback.


Edit: Thanks! It worked!
Reply
#7

SetTimerEx(StopAudioStreamForPlayer, 2000, 0, "d", playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)