Forum

> > CS2D > General > Different death sound for different player
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Different death sound for different player

11 replies
To the start Previous 1 Next To the start

old Different death sound for different player

hacked
User Off Offline

Quote
Hey,can someone help me?

I can't script a lua so I requested you guys something:
Different death sounds for different playermodels

For personal use,if I use it on a file,I will give you creds.

Thank you,and have a nice scripting.

Oh wait,the first who give the script and usable will get a gift from me.
edited 1×, last 24.08.12 12:59:07 pm

old Re: Different death sound for different player

EndDead
User Off Offline

Quote
i think he wants it server-side..
anyway use the death hook/function then do parse sv_sound 2 but i don't think it would remove the old death sound, it will just add a sound on the old one

old Re: Different death sound for different player

mafia_man
User Off Offline

Quote
This may be problem because default sound is always played when player dies. You can only do this via lua, probably by setting player pos to 0, 0 in hit hook when player will die and customkill him, and after this play sound at his die position and draw blood where he died.

old Re: Different death sound for different player

doublejack
User Off Offline

Quote
you can just google "empty sound files", download it and make original sound empty.
the script would look like

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
addhook("die","_die")
function _die(v,k,w,x,y)
	local t=player(v,"team")
	local l=player(v,"look")
	if t==1 then
		if l==1 then
			sound for ct with skin 1
		elseif l==2 then
			sound for ct with skin 2
		elseif l==3 then
			sound for ct with skin 3
		else
			sound for ct with skin 4
	elseif t==2 then
		if l==1 then
			sound for t with skin 1
		elseif l==2 then
			sound for t with skin 2
		elseif l==3 then
			sound for t with skin 3
		else
			sound for t with skin 4
		end
	end
end
edited 1×, last 24.08.12 02:17:12 pm

old Re: Different death sound for different player

doublejack
User Off Offline

Quote
oh, really.

upd. but we can use hit hook as you said, but not customkill player :

hit hook
if player(id,"health")-hpdmg<=0 then
     setpos 0,0
     blood on die x,y
     play sound at die x,y

if his health <= 0 he would die so it is no need in customkill .
maybe it is a solution

old ?

Mr Jack1e
User Off Offline

Quote
And what about people near (0,0) position? They would still hear it
edited 1×, last 24.08.12 02:51:06 pm
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview