Author Topic: Stopping 2D sounds?  (Read 1039 times)

So I was experimenting with the command play2d(); on my client. I played music, but now I need to stop it. I need to know if there is even a way to stop it because if there is, then I can update my Minigame Music addon. I need a command that would be sort of like stop2d(); or something like that.



To stop a 2d sound, you will need these codes:

Code: [Select]
%obj.playAudio(2,soundName);
%obj.stopAudio(2);

the 2 is how it can stop the audio from playing. Which means when it plays, its in the 2nd slot, it will then cancel the audio in the 2nd slot.

EDIT: You should be able to change the number, but I wouldn't recommend.
« Last Edit: April 07, 2013, 12:31:03 AM by Advanced Bot »

playAudio() isn't a valid function for a client.

It's for a player, trying doing

%client.player.playAudio(2,soundName);
%client.player.stopAudio(2);