Jump to content

play sound


enzopaul4

Recommended Posts

Posted

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) 

 

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

Posted
Just now, Simple01 said:

The next time try to help for real, cuz your script has base errors. :P:D

YEHH   ,  i   am biginner    . and i  am  very bad.. but neah  , i want to make my best

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