All pastes #987597 Raw Edit

Anonymous

public lua v1 · immutable
·published 2008-04-16 17:17 UTC
rendered paste body
function GM:EndRound(winningteam)		team.SetScore(winningteam,team.GetScore(winningteam) + 1)		for k,v in pairs(player.GetAll()) do 		if v:Team() == winningteam then			v:GodEnable()		end		if team.GetScore(winningteam) == GameInfo.MaxScore - 1 then			v:ChatPrint(team.GetName(winningteam).." only needs to win one more game!")		elseif team.GetScore(winningteam) >= GameInfo.MaxScore then			v:ChatPrint(team.GetName(winningteam).." won the game!")		else 			v:ChatPrint(team.GetName(winningteam).." won the round!")		end	end		if team.GetScore(winningteam) >= GameInfo.MaxScore then		GAMEMODE:EndGame()	else		timer.Create("NextRoundTimer", 10, 1, GAMEMODE.RestartRound, GAMEMODE)	end	endfunction GM:RestartRound()	for k,v in pairs(player.GetAll()) do		v:Spawn()		v:Freeze(true)		v:ChatPrint("Get ready...")		v:GodDisable()	end	timer.Create("BeginningRoundTimer", 3, 1, GAMEMODE.StartRound, GAMEMODE)endfunction GM:StartRound()	for k,v in pairs(player.GetAll()) do		v:VoiceSound(ChooseRandom(v.Info.Taunt),100,math.Rand(0,3))		v:Freeze(false)		v:ChatPrint("Play ball!")	endend