PaLaS0 Posted June 9, 2014 Share Posted June 9, 2014 So Hello guys, I want to make gun sounds on my server, so I have found one script from the internet which looks like this addEventHandler("onClientPlayerWeaponFire", getRootElement(), function ( weapon, ammo, ammoInClip ) local x,y,z = getElementPosition(source) if weapon == 30 then local sound = playSound3D("Ak.wav", x,y,z) setSoundMaxDistance(sound,75) end end ) so ak for me worked but I have a problem, I cant do m4 because it has 30 bullets too, sniper doenst have magazines bullets can go over 9999 please help me, script works for me but some guns like snipers dont Link to comment
Cadell Posted June 9, 2014 Share Posted June 9, 2014 weapon == 30 is not bullet that is weapon id u can find all id from wiki mta and 31 is id of m4 Link to comment
PaLaS0 Posted June 9, 2014 Author Share Posted June 9, 2014 Thank you so much:) You helped me a lot Link to comment
Max+ Posted June 9, 2014 Share Posted June 9, 2014 if you want it to work for other Guns , use playSound 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