Im trying to get this part of the code to check if just a certain team has 0 players rather than if everyone is dead. Only problem is I cant figure it out. Ive tried team.NumPlayers( TEAM_GUEST ) in there but it still doesnt work.
[LUA]DeathCheck = function(pl, attacker, dmginfo)
if R.Round == 1 then
local dead = 0
for k, v in pairs(player.GetAll()) do
if !v:Alive() then
dead = dead+1
if dead >= #player.GetAll() then R.NewRound() end end end hook.Add("PlayerDeathThink", "deathcheck.", DeathCheck)[/LUA]