I need it because in ZM gamemode, sometimes no one in ZM team and all CT have to wait endround to restart!
I'm bad English. So if u dont understand, post to me!
zm = {} addhook('second','zm.second') zm.second = function() 	zm.t = {} 	zm.ct = {} 	for _, id in pairs(player(0,'table')) do 		if player(id,'team') == 1 then 			table.insert(zm.t,id) 		elseif player(id,'team') == 2 then 			table.insert(zm.ct,id) 		end 	end 	if #zm.t == 0 then 		parse('maket '..zm.ct[math.random(1,#zm.ct)]) 		parse('restart') 	end end
addhook('leave', 'teamchange') addhook('team', 'teamchange') function teamchange() 	local a = player(0, 'team1') 	if a[1] < 1 or a[1] > 32 then -- I actually don't know what it returns if there's no terrorists. Possibly 0 or so? 		parse('restart') 		local b = player(0, 'team2') 		parse('maket '..b[math.random(1, #b]) 	end end
if zm == nil then zm = {} end addhook('leave','zm.leave') addhook('team','zm.team') zm.leave = function(id) 	if player(id,'team') == 1 then 		zm.reload(id) 	end end zm.team = function(id) 	if player(id,'team') == 1 then 		zm.reload(id) 	end end zm.reload = function(id) 	local t, ct = player(0,'team1'), player(0,'team2') 	if #t == 0 then 		parse('maket '..math.random(1,#ct)) 		parse('restart') 	end end