forked from Not/srb2k-leaderboard
v1.2.6
This commit is contained in:
parent
18a81fab6d
commit
b0d5b5abeb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user