From b0d5b5abebaad595f41f236fe670621a2b8e8817 Mon Sep 17 00:00:00 2001 From: Not Date: Mon, 28 Mar 2022 13:11:00 +0200 Subject: [PATCH] v1.2.6 --- leaderboard.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/leaderboard.lua b/leaderboard.lua index 967c610..89ff699 100644 --- a/leaderboard.lua +++ b/leaderboard.lua @@ -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