This commit is contained in:
Not 2022-03-28 13:11:00 +02:00
parent 18a81fab6d
commit b0d5b5abeb
1 changed files with 15 additions and 2 deletions

View File

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