Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
017794c554 | |||
2e5c209a65 |
@ -3,7 +3,7 @@
|
|||||||
local FILENAME = "leaderboard.txt"
|
local FILENAME = "leaderboard.txt"
|
||||||
local lb = {}
|
local lb = {}
|
||||||
local timeFinished = 0
|
local timeFinished = 0
|
||||||
local disable = true
|
local disable = false
|
||||||
local prevLap = 0
|
local prevLap = 0
|
||||||
local splits = {}
|
local splits = {}
|
||||||
local PATCH = nil
|
local PATCH = nil
|
||||||
@ -103,12 +103,16 @@ local function ingame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function initLeaderboard(player)
|
local function initLeaderboard(player)
|
||||||
|
if disable and leveltime < startTime then
|
||||||
disable = ingame() > 1
|
disable = ingame() > 1
|
||||||
|
else
|
||||||
|
disable = disable or ingame() > 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
addHook("PlayerSpawn", initLeaderboard)
|
addHook("PlayerSpawn", initLeaderboard)
|
||||||
|
|
||||||
local function doyoudare(player)
|
local function doyoudare(player)
|
||||||
if disable or player.spectator then
|
if ingame() > 1 or player.spectator then
|
||||||
CONS_Printf(player, "How dare you")
|
CONS_Printf(player, "How dare you")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -117,6 +121,10 @@ end
|
|||||||
|
|
||||||
local function retry(player, ...)
|
local function retry(player, ...)
|
||||||
if doyoudare(player) then
|
if doyoudare(player) then
|
||||||
|
-- Prevents bind crash
|
||||||
|
if leveltime < 15 then
|
||||||
|
return
|
||||||
|
end
|
||||||
COM_BufInsertText(server, "map " + G_BuildMapName(gamemap))
|
COM_BufInsertText(server, "map " + G_BuildMapName(gamemap))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -139,6 +147,9 @@ local function changelevel(player, ...)
|
|||||||
if not doyoudare(player) then
|
if not doyoudare(player) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if leveltime < 15 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local map = ...
|
local map = ...
|
||||||
if map == nil then
|
if map == nil then
|
||||||
|
Reference in New Issue
Block a user