0

BIEM! Custom car explosion sound in MTA

Some guy on a local Dutch news station imitating the sound of an explosion -which had happened that night- inspired a lot of funny remix videos. It inspired me to create a MTA resource to replace the sound of a car explosion with that BIEM sound, much to the hilarity/annoyance of other players in the server.

Simply create a clientside script, cancel the default explosion event, and create a new explosion with makesound set to false. Then let it play your custom sound.

addEventHandler("onClientExplosion", root, function()
	cancelEvent()
	
	local pX, pY, pZ = getElementPosition ( source )
	sound = playSound3D("biem.mp3", pX, pY, pZ, false)
	setSoundMaxDistance ( sound, 150 )	
	createExplosion(pX, pY, pZ, 4, false, -1.0, true)
	

end)

 

Rhytz

Tech-enthusiast since birth. Web developer and professional coffee drinker by day, programming fun stuff for online games or tinkering with my pinball machines by night.Not shy of drinking some (craft) beers during the weekend.