Jump to content

mute original weapon sound


swag_k_dog

Recommended Posts

hello, I tried to script a new sound for ak-47 but the original sound is still here, and it sounds buggy when combined..

function disableSounds()
setAmbientSoundEnabled ("gunfire", false )
end
addEventHandler("onClientResourceStart", root,disableSounds)

local function playGunfireSound(weaponID)
    local muzzleX, muzzleY, muzzleZ = getPedWeaponMuzzlePosition(source)
    local px, py, pz = getElementPosition ( source )
	
if weaponID == 30 then --ak47
     local sound = playSound3D("sounds/weap/AK.mp3", muzzleX, muzzleY, muzzleZ, false)
     setSoundMaxDistance(sound, 30)
  end
end
addEventHandler("onClientPlayerWeaponFire", root, playGunfireSound)



	

what is the problem?

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