From 5c4ebc932d8c02522802c842d43d863d89aca162 Mon Sep 17 00:00:00 2001 From: Apickx Date: Mon, 28 Dec 2015 19:10:44 -0500 Subject: Initial commit --- gamemode/shared/game_rounds.lua | 105 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 gamemode/shared/game_rounds.lua (limited to 'gamemode/shared/game_rounds.lua') diff --git a/gamemode/shared/game_rounds.lua b/gamemode/shared/game_rounds.lua new file mode 100644 index 0000000..67b77c9 --- /dev/null +++ b/gamemode/shared/game_rounds.lua @@ -0,0 +1,105 @@ +local meta = FindMetaTable("Player") +local Time = 10 + +if (SERVER) then + util.AddNetworkString("RoundStart") + + function GM:StartCountDown() + self.CountDown = CurTime()+Time+1 + + //items to clean up in between rounds + cleanup = { + "ws_alter", + "ws_arrow", + "ws_barrel", + "ws_campfire", + "ws_grave", + "ws_infuser", + "ws_item", + "ws_prop", + "ws_researchtable", + "ws_shop", + "ws_rune", + } + for k,v in pairs(cleanup) do + for i,j in pairs(ents.FindByClass(v)) do + j:Remove() + end + end + + + + --Generate a completly new rain of props :D + self:GeneratePropRain() + + net.Start("RoundStart") + net.WriteUInt(Time,8) + net.Broadcast() + end + + function meta:UpdateRoundTimer() + if (!self.CountDown or self.CountDown