Maccer. Posted September 3, 2009 Posted September 3, 2009 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.
50p Posted September 3, 2009 Posted September 3, 2009 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.
Maccer. Posted September 3, 2009 Author Posted September 3, 2009 (edited) 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 September 3, 2009 by Guest
Maccer. Posted September 3, 2009 Author Posted September 3, 2009 Is the event triggered at all? Does it have to be? Because this client-script isn't triggered but does its job. (addEventHandler BTW) In-case anyone is interested. The server shows up as "Maccer's Test Server"
50p Posted September 3, 2009 Posted September 3, 2009 Every event is triggered when something occurs. Are you sure it's triggered? Try onClientPedDamage too.
Maccer. Posted September 3, 2009 Author Posted September 3, 2009 Every event is triggered when something occurs. Are you sure it's triggered? Try onClientPedDamage too. I even tried it on spawn. It just won't play anywhere.
50p Posted September 3, 2009 Posted September 3, 2009 Try to see what playSound returned. Eg: outputDebugString( tostring( sound ) )
Maccer. Posted September 3, 2009 Author Posted September 3, 2009 Try to see what playSound returned. Eg: outputDebugString( tostring( sound ) ) It returns false. ): Not sure why. ^ The meta.xml, I see nothing wrong with it though. Edit: I fixed it! I removed the "type" attribute. Apparently it caused problems.
iChris Posted September 3, 2009 Posted September 3, 2009 Why are you using type parameter? For tag there is only one parameter available and it is src. https://wiki.multitheftauto.com/index.php?title=Meta.xml
Maccer. Posted September 3, 2009 Author Posted September 3, 2009 Why are you using type parameter? For tag there is only one parameter available and it is src.https://wiki.multitheftauto.com/index.php?title=Meta.xml There was a type attribute though. I wonder if my custom billboards still work... shit.
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