Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Config = {
- plypertimeadd = 5, -- Per player
- fiveplytimemin = 5, --default time to start at
- addtime = 1 --Added after amount of "per player" is reached
- }
- function ChangeRoundTime()
- PlayersTab = player.GetAll()
- AlivePlayers = {}
- for k,v in pairs(PlayersTab) do
- if v:Alive() then
- table.insert(AlivePlayers, table.Count(AlivePlayers) + 1, v)
- end
- end
- timer.Create("SetTime", GetConVarNumber("ttt_preptime_seconds") - 2, 1, function()
- RunConsoleCommand("ttt_roundtime_minutes", Config.fiveplytimemin + (math.floor((math.floor(table.Count(AlivePlayers) / Config.plypertimeadd) * Config.plypertimeadd) / Config.plypertimeadd)) * Config.addtime)
- table.Empty(AlivePlayers)
- end)
- end
- hook.Add("TTTPrepareRound", "SetRoundTime", ChangeRoundTime)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement