enzopaul4 Posted October 22, 2016 Posted October 22, 2016 Why not working?Why?Cai?Vai?? Pz Help plz function play () local sound = playSound("resources/christmasde.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onPlayerJoin", localPlayer,)
Simple0x47 Posted October 22, 2016 Posted October 22, 2016 It's because you're using a client-only function into server-side. Try this CLIENT: function playThatSound() local sound = playSound("resources/christmasde.mp3") setSoundVolume(sound, 0.5) end addEventHandler("onClientResourceStart", root, playThatSound)
2013martin1212 Posted October 22, 2016 Posted October 22, 2016 function play() sound = playSound("resources/christmasde.mp3",true) setSoundVolume(sound,0.5) end addEventHandler("onPlayerJoin",playSound) try this way
Simple0x47 Posted October 22, 2016 Posted October 22, 2016 5 minutes ago, 2013martin1212 said: function play() sound = playSound("resources/christmasde.mp3",true) setSoundVolume(sound,0.5) end addEventHandler("onPlayerJoin",playSound) try this way It would give error, cuz first theres use of client-side only functions like playSound, and then the onPlayerJoin it's serverside and calls a client-side only function that's pretty strange. Use the one I've posted before.
Simple0x47 Posted October 22, 2016 Posted October 22, 2016 (edited) 4 minutes ago, 2013martin1212 said: np happy to help The next time try to help for real, cuz your script has base errors. Edited October 22, 2016 by Simple01
enzopaul4 Posted October 22, 2016 Author Posted October 22, 2016 Just now, Simple01 said: The next time try to help for real, cuz your script has base errors. YEHH , i am biginner . and i am very bad.. but neah , i want to make my best
Simple0x47 Posted October 22, 2016 Posted October 22, 2016 No no, I was talking about @2013martin1212
2013martin1212 Posted October 22, 2016 Posted October 22, 2016 i no not the best scripter i am but if works then works
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