im just looking for a free for all, once you die you end up in spectators script
thank you in advanced
Scripts
Needed Hunger Games Script
Needed Hunger Games Script
1

addhook("join","hgjoin")
addhook("leave","hgleave")
addhook("die","hgdie")
addhook("endround","hgend")
addhook("team","hgteam")
addhook("spawn","hgspawn")
function initArray(m)
	local array={}
	for i=1, m do
		array[i]=0
	end
	return array
end
dead=initArray(32)
cht=initArray(32)
chs=initArray(32)
stat=initArray(32)
	
function hgjoin(id)
stat[id]=1
end
function hgleave(id)
	rd[id]=0
	cht[id]=0
end
function hgdie(vid,kid)
	parse("makespec "..vid)
	dead[vid]=1
	if #player(0,"tableliving")==1 then
		parse("sv_restart 5")
	end
end
function hgend()
	for i=1, 32 do
		dead[i]=0
		if cht[i]==1 then
			parse("maket "..i)
		elseif cht[i]==2 then
			parse("makect "..i)
		end
	end
end
function hgteam(id)
if dead[id]==1 then
	return 1
end
end
function hgspawn(id)
if stat[id]==1 then
	cht[id]=player(id,"team")
	chs[id]=player(id,"skin")
	stat[id]=2
end
end
Cebra's code core works as it is intended however there's something that causes C Stack Overflow in a loop when the
endround hook is called and its function. The line of code (line 39) that causes it is this:for i=1, 32 do
player and assign in the bracket parameter the table to iterate all the players in a server.
1
