Cab be triggered by a simple text
General
Lua Scripts for CS2D
Poll| Awesome! | 85.88% (225) | |
| Sounds good. | 7.25% (19) | |
| Bad idea. I hate Lua! | 3.44% (9) | |
| I have no idea. | 3.44% (9) |

--------------------------------------------------
-- UT+Quake Sounds Script by Unreal Software --
-- 22.02.2009 - www.UnrealSoftware.de --
-- Adds UT and Quake Sounds to your Server --
--------------------------------------------------
-----------------------
-- INITIAL SETUP --
-----------------------
uttimer = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
utlevel = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-----------------------
-- PREPARE TO FIGHT! --
-----------------------
function hook_startround()
	parse("sv_sound \"fun/prepare.wav\"");
end
-----------------------
-- KILL SOUNDS+MSGS --
-----------------------
function hook_kill(killer,victim,weapon)
	if (os.clock()-uttimer[killer])>3 then
		utlevel[killer]=0;
	end
	level=utlevel[killer];
	level=level+1;
	utlevel[killer]=level;
	uttimer[killer]=os.clock();
	-- HUMILIATION? (KNIFEKILL)
	if (weapon==50) then
		-- HUMILIATION!
		parse("sv_sound \"fun/humiliation.wav\"");
		msg (player(killer,"name").." humiliated "..player(victim,"name").."!");
	else
		-- REGULAR KILL
		if (level==1) then
			-- Single Kill! Nothing Special!
		elseif (level==2) then
			parse("sv_sound \"fun/doublekill.wav\"");
			msg (player(killer,"name").." made a Doublekill!");
		elseif (level==3) then
			parse("sv_sound \"fun/multikill.wav\"");
			msg (player(killer,"name").." made a Multikill!");
		elseif (level==4) then
			parse("sv_sound \"fun/ultrakill.wav\"");
			msg (player(killer,"name").." made an ULTRAKILL!");
		elseif (level==5) then
			parse("sv_sound \"fun/monsterkill.wav\"");
			msg (player(killer,"name").." made a MO-O-O-O-ONSTERKILL-ILL-ILL!");
		else
			parse("sv_sound \"fun/unstoppable.wav\"");
			msg (player(killer,"name").." is UNSTOPPABLE! "..level.." KILLS!");
		end
	end
end
function initArray(m)
	local array = {}
	for i = 0, m do
		array[i] = 0
	end
	return array
end
function newIndice(array, m)
	
	if (table.getn(array) <= m+1) then
		for i = table.getn(array) -1, m do
			array[i] = 0
		end
	end
	return array
end
uttimer = initArray(maxplayers)
utlevel = initArray(maxplayers)


function initArray(i, m, array)
	if (array == nil) then array = {} end
	if (m == nil) then m = i; i = 1 end
	for i = i , m do
		if (array[i] == nil) then
			array[i] = 0
		end
	end
	return array
end
uttimer = initArray(1, 32, {123, 34, 35, 45})
utlevel = initArray(32)
123 34 35 45 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


