Forum

> > CS2D > General > Different death sound for different player
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Different death sound for different player

11 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Different death sound for different player

hacked
User Off Offline

Zitieren
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.
1× editiert, zuletzt 24.08.12 12:59:07

alt Re: Different death sound for different player

EndDead
User Off Offline

Zitieren
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

alt Re: Different death sound for different player

mafia_man
User Off Offline

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

alt Re: Different death sound for different player

doublejack
User Off Offline

Zitieren
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
1× editiert, zuletzt 24.08.12 14:17:12

alt Re: Different death sound for different player

doublejack
User Off Offline

Zitieren
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

alt ?

Mr Jack1e
User Off Offline

Zitieren
And what about people near (0,0) position? They would still hear it
1× editiert, zuletzt 24.08.12 14:51:06
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht