Jump to content

Playing A Sound?


Maccer.

Recommended Posts

Well, I tried to use a sound, but it fails. Obviously, I defined it in the meta.xml and it downloaded. Here's the code.

addEventHandler("onClientPlayerDamage", getLocalPlayer(),
function (attacker, weapon, bodypart, loss)
	if bodypart == 9 then
		local sound = playSound("fu_neck.mp3")
		setSoundVolume(sound, 0.75)
		setGameSpeed(0.3)
	end
end
)

Not sure why it won't play. :? Yes it's a client-side script.

Link to comment
Because of the game speed? I'm 99% sure that game speed affects sounds, even original ingame sounds. If the game speed is too low you won't hear any music in your car, so that might be game speed issue.

I tried removing the gamespeed. It still doesn't work. Plus the libary is external, why should it not play during slow downs?

Edited by Guest
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...