This commit is contained in:
Not 2022-03-28 13:11:00 +02:00
parent 18a81fab6d
commit b0d5b5abeb

View File

@ -7,6 +7,7 @@ local disable = true
local prevLap = 0 local prevLap = 0
local splits = {} local splits = {}
local PATCH = nil local PATCH = nil
local help = true
local Flags = 0 local Flags = 0
@ -101,8 +102,9 @@ local function initLeaderboard(player)
disable = ingame > 1 disable = ingame > 1
if disable then if disable or ingame == 0 then
--print("To many players in game, leaderboard has been disabled") -- Print the help message next time someone is alone
help = true
return return
end end
end end
@ -142,6 +144,11 @@ local function changelevel(player, ...)
end end
local map = ... local map = ...
if map == nil then
CONS_Printf(player, "Usage: changelevel MAPXX")
return
end
local p, q = map:upper():match("MAP(%w)(%w)$", 1) local p, q = map:upper():match("MAP(%w)(%w)$", 1)
if not (p and q) then if not (p and q) then
CONS_Printf(player, string.format("Invalid map name: %s", map)) CONS_Printf(player, string.format("Invalid map name: %s", map))
@ -473,6 +480,12 @@ local function think()
end end
if leveltime < startTime then if leveltime < startTime then
-- Help message
if help and leveltime == startTime - TICRATE * 3 then
help = false
chatprint("\x89Leaderboard Commands:\nretry exit findmap changelevel spba_clearcheats", true)
end
Flags = $ & !(F_SPBATK | F_SPBEXP | F_SPBBIG | F_SPBJUS) Flags = $ & !(F_SPBATK | F_SPBEXP | F_SPBBIG | F_SPBJUS)
if leveltime > startTime - (3 * TICRATE) / 2 and server.SPBArunning then if leveltime > startTime - (3 * TICRATE) / 2 and server.SPBArunning then
Flags = $ | F_SPBATK Flags = $ | F_SPBATK