Sockylite Posted October 25, 2016 Share Posted October 25, 2016 Hi there! Hope y'all doing fine, so, today I'm here to know if it's possible to play a sound when someone throws a grenade, like "Fire In The Hole" or even "Grenade!" Is that possible? Link to comment
Mr.Loki Posted October 25, 2016 Share Posted October 25, 2016 (edited) 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 October 25, 2016 by loki2143 1 Link to comment
Storm-Hanma Posted October 25, 2016 Share Posted October 25, 2016 We should need to add meta.XML also with this lua? Right then run it ? Link to comment
Gravestone Posted October 25, 2016 Share Posted October 25, 2016 3 minutes ago, Khadeer143 said: We should need to add meta.XML also with this lua? Right then run it ? You will have to add the sound file location in the meta.xml and then play it using PlaySound with the file path. For example: <!-- Meta.xml--> <meta> <file src="fileName.mp3" /> </meta> -- lua file playSound("fileName.mp3") Link to comment
Storm-Hanma Posted October 25, 2016 Share Posted October 25, 2016 Yea p i got same idea and i know !!and u know me well also becoz both r groam players 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