trgameraptor Posted June 14, 2017 Share Posted June 14, 2017 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 ) Link to comment
pa3ck Posted June 14, 2017 Share Posted June 14, 2017 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 Link to comment
trgameraptor Posted June 14, 2017 Author Share Posted June 14, 2017 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 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now