Jump to content

Play a sound when someone throws a Grenade


Sockylite

Recommended Posts

function projectileCreation( creator )
	local projectileType = getProjectileType( source ) -- We get the projectile type
	if projectileType == 16 then -- If is grenade then...
		playsound3D("sound.mp3",getElementPosition(creator),false) --Play your grenade sound
	end
end
addEventHandler( "onClientProjectileCreation", getRootElement( ), projectileCreation )

for some reason i can't select LUA syntax...

Edited by loki2143
  • Like 1
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...