Sign in to follow this  
trgameraptor

Music stops when player log in

Recommended Posts

Hello friends,

The music stops when the player logs in 
how can I do ? 

 

addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function()
    setTimer(function()
        playSound("joinsound.mp3")
    end, 200, 1)
end
)

 

Share this post


Link to post

First make sure you keep the sound element in a variable (sound = playSound("...") ) then there is more than likely an event in your code which triggers when the user logs in. If you use the default login system, then there's a server-side event "onPlayerLogin" which you can use to turn off the sound on client-side with a trigger

Share this post


Link to post
1 hour ago, pa3ck said:

First make sure you keep the sound element in a variable (sound = playSound("...") ) then there is more than likely an event in your code which triggers when the user logs in. If you use the default login system, then there's a server-side event "onPlayerLogin" which you can use to turn off the sound on client-side with a trigger

I could not code Would you help me do it

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.