If a counter-terrorist die, appears images gfx / testing / image2.bmp in center of the screen // play sound sfx/sound2.wav
The image disappears in 3 seconds
Can someone do that?
edited 1×, last 02.02.16 02:33:34 am
Scripts
Image in center of screen
Image in center of screen
1

addhook("die","_die")
function _die(victim)
	local i = image("gfx/testing/image"..math.min(player(victim,"team"),2)..".bmp",320,240,2)
	timer(3000,"freeimage",i)
	parse("sv_sound sound"..math.min(player(victim,"team"),2)..".wav")
end
parse("sv_sound sound"..math.min(player(victim,"team"),2)..".wav")
parse("sv_sound sfx/sound"..math.min(player(victim,"team"),2)..".wav")
Jedediastwo: Are you sure that you have both of the image and the sfx in the right place?function die_(victim)
	if player(victim, "team") == 1 then
		local i = image("gfx/testing/image.bmp", 320 , 240, 2)
		timer(3000,"freeimage", i)
		parse("sv_sound \"sound/test.wav\"")
	elseif player(victim, "team") == 2 then
		local i2 = image("gfx/testing/image2.bmp", 320 , 240, 2)
		timer(3000,"freeimage", i2)
		parse("sv_sound \"sound/test2.wav\"")
	end
end
addhook("die","die_")
1
