Tekken Posted July 7, 2015 Share Posted July 7, 2015 I think the title says all. I only need any function/event I can use. Thanks. Link to comment
Miika Posted July 7, 2015 Share Posted July 7, 2015 This topic maybe help you: https://forum.multitheftauto.com/viewtopic.php?f=91&t=58918&p=561437 Link to comment
Tekken Posted July 7, 2015 Author Share Posted July 7, 2015 This topic maybe help you: https://forum.multitheftauto.com/viewtopic.php?f=91&t=58918&p=561437 Thanks. Link to comment
Tekken Posted July 7, 2015 Author Share Posted July 7, 2015 But is a problem, when I shoot I hear two sounds default and my sound. How do I desable the default? Edit: I found if I use *.mp3 is slower then *.wav and will be played later that's the problem. Link to comment
TheSmart Posted July 7, 2015 Share Posted July 7, 2015 i think you can do it by SetWorldSoundEnabled Link to comment
IMr.SuLT4N Posted July 8, 2015 Share Posted July 8, 2015 -------------- --by MazzMan -------------- local distance = 75 --distance from where you can hear the shot local explostionDistance = 150 local cSoundsEnabled = true local reloadSoundEnabled = true local explosionEnabled = true --shoot sounds function playSounds(weapon, ammo, ammoInClip) if(cSoundsEnabled)then local x,y,z = getElementPosition(source) if weapon == 31 then --m4 if(ammoInClip == 0 and reloadSoundEnabled)then mgReload("sounds/weapon/m4.wav", x,y,z) else local sound = playSound3D("sounds/weapon/m4.wav", x,y,z) setSoundMaxDistance(sound, distance) end 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