Jump to content

How would I?


Recommended Posts

-- Client Side -- 
  
JoinMusic = playSound(...) 
  
addEvent("onLogin", true) 
addEventHandler("onLogin", root, 
function() 
    if isElement(JoinMusic) then 
        destroyElement(JoinMusic) 
    end 
end) 

-- Server Side -- 
  
addEventHandler("onPlayerLogin", root, 
function() 
    triggerClientEvent(source, "onLogin", source) 
end) 

Link to comment

Set looped argument to true.

JoinMusic = playSound("song.mp3", true) 

Try this for debug and see if it output or not.

addEventHandler("onPlayerLogin", root, 
function() 
    outputChatBox("Login!") 
    triggerClientEvent(source, "onLogin", source) 
end) 

addEvent("onLogin", true) 
addEventHandler("onLogin", root, 
function() 
    outputChatBox("Trigger!") 
    if isElement(JoinMusic) then 
        outputChatBox("Destroy!") 
        destroyElement(JoinMusic) 
    end 
end) 

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...