Jump to content

Scripting in mta


PaLaS0

Recommended Posts

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

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