Machine Posted January 9, 2022 Share Posted January 9, 2022 i am trying to change the sound of the default m4 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/weapons/m4_reload.wav", x,y,z) else local sound = playSound3D("sounds/weapons/m4_shooting.wav", x,y,z) setSoundMaxDistance(sound, distance) end end end end still it doesnt replace anything what am i doing wrong please help Link to comment
NeXuS™ Posted January 9, 2022 Share Posted January 9, 2022 As I can see, you just kinda copy-pasted an old code, there is no trigger in this whole script tho. onClientPlayerWeaponFire should be used. 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