Jump to content

Sound


CapY

Recommended Posts

I got problem in one part of the script

When i joins , sound starts to play , but when i press "o " sounds stops , when i press it again , sound doesnt want to start again

Here :

I tried like this

bindKey("o", "down",  
    function () 
        if isElement(song) then 
        stopSound(song) 
            else 
            if isElement(song) then 
            playSound(song) 
        end 
    end 
)  

and like this :

bindKey("o", "down",  
    function () 
        if isElement(song) then 
        stopSound(song) 
            else 
            playSound(song) 
        end 
    end 
) 

This is just a part of the code.

Link to comment
function playMusic() 
if isElement(music) then 
            stopSound(music, false) 
        outputChatBox("#FF8000* #FFFFFFRadio music stopped!", 200, 100, 0, true) 
            else 
music = playSound("http://lemon.citrus3.com/castcontrol/playlist.php?id=51&type=pls") 
end 
    end 
bindKey("M", "Down", playMusic) 

You can edit the playSound if you want

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...