Jump to content

death sound


sonic1

Recommended Posts

Posted

Hi guys 

 

I usually making destruction derby maps. And I saw in one derby map, when somebody die I heard a sound file like hahaha and I want to add this type of script in my map, but i have no idea how to do it. I can't find anything about it on wikia :( 

 

(I heard this sound when I died or when I watched somebody after my death

Posted

thanks I will try script with it xD

addEventHandler( "onPlayerWasted", getRootElement( ),
	
        function()  wasted (killer, weapon, bodypart) 
	local sound = playSound ("song.mp3", true)
        setSoundVolume(sound, 0.5)


  


end 

addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted )

Is it correct ? i'm new in scripting :D

Posted
addEventHandler ( "onClientPlayerWasted", localPlayer,
function  (   )
			local sound = playSound("song.mp3",false)
			setSoundVolume(sound, 0.5)
	end
)

 

 

ClientSide script.

Posted (edited)

Guys one more thing :) 

 

Can you tell me how to set volume of song (this song is play during the map) 

 

I used it 

setSoundVolume(sound, 0.5)

but nothing happened  

 

 

If need I can show you my playsound script

Edited by sonic1

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