Stop playing a Sound

Markhoz

  • Newbie
  • Posts: 6
Stop playing a Sound
«  »
I'm making a music player for a system I'm doing, and I'd like to know if it's possible that the music stops when I press the STOP button and what function would it be?

umar4911

  • Sr. Member
  • Creating own server!
  • Posts: 472
I am gamer, programmer and hacker. Try to find me!
xD

Markhoz

  • Newbie
  • Posts: 6
Re: Stop playing a Sound
« Reply #2,  »
The function that I am using is that of PlaySoundForPlayer, and I have the doubt to know if the sound could be stopped

Athanatos

  • Hero Member
  • Romania Cops N Robbers Lead Developer
  • Posts: 796
Re: Stop playing a Sound
« Reply #3,  »
You can use something like that to stop the sound:
Code: [Select]
for(local i =0 ; i < 1000;i++) PlaySound( normal params but play an empty sound)

Because you will 'overflow' the sound memory and the sound card will play the empty sound instead afaik.

Markhoz

  • Newbie
  • Posts: 6
Re: Stop playing a Sound
« Reply #4,  »
I tried your recommendation using PlaySound (player.World, 99999, player.Pos) as an example, but it does not work and it continues to play the sound, how does it work?

Luis_Labarca

  • Sr. Member
  • Hello :D
  • Posts: 298
Re: Stop playing a Sound
« Reply #5,  »

hello friend that works does not exist only works to play once the audio started can not be stopped until I finish in a while I asked that question and you can not :-\
My server ...:: RPG ::...
IP: 149.56.143.129:8195

Athanatos

  • Hero Member
  • Romania Cops N Robbers Lead Developer
  • Posts: 796
Re: Stop playing a Sound
« Reply #6,  »
Quote from Markhoz on June 23rd, 07:22 AM
I tried your recommendation using PlaySound (player.World, 99999, player.Pos) as an example, but it does not work and it continues to play the sound, how does it work?
Use an existing sound.

Markhoz

  • Newbie
  • Posts: 6
Re: Stop playing a Sound
« Reply #7,  »
It does not work with an existing sound either. but likewise thank you for answering

Luis_Labarca

  • Sr. Member
  • Hello :D
  • Posts: 298
Re: Stop playing a Sound
« Reply #8,  »Last edited
Quote from Markhoz on June 23rd, 07:40 PM
It does not work with an existing sound either. but likewise thank you for answering
friend does not work because that stop sound function does not exist for PlaySound ()

I also asked me how to stop a sound and they told me that I could not :-\ :-\
My server ...:: RPG ::...
IP: 149.56.143.129:8195