forked from Not/srb2k-leaderboard
v1.2.7
This commit is contained in:
parent
b0d5b5abeb
commit
bc002667c8
@ -92,21 +92,18 @@ else
|
||||
print("Failed to open file: ", FILENAME)
|
||||
end
|
||||
|
||||
local function initLeaderboard(player)
|
||||
local ingame = 0
|
||||
local function ingame()
|
||||
local n = 0
|
||||
for p in players.iterate do
|
||||
if p.valid and not p.spectator then
|
||||
ingame = ingame + 1
|
||||
n = $ + 1
|
||||
end
|
||||
end
|
||||
return n
|
||||
end
|
||||
|
||||
disable = ingame > 1
|
||||
|
||||
if disable or ingame == 0 then
|
||||
-- Print the help message next time someone is alone
|
||||
help = true
|
||||
return
|
||||
end
|
||||
local function initLeaderboard(player)
|
||||
disable = ingame() > 1
|
||||
end
|
||||
addHook("PlayerSpawn", initLeaderboard)
|
||||
|
||||
@ -473,6 +470,7 @@ end
|
||||
|
||||
local function think()
|
||||
if disable then
|
||||
help = true
|
||||
return
|
||||
end
|
||||
if showSplit > 0 then
|
||||
@ -481,9 +479,15 @@ local function think()
|
||||
|
||||
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)
|
||||
if leveltime == startTime - TICRATE * 3 then
|
||||
if ingame() == 1 then
|
||||
if help then
|
||||
help = false
|
||||
chatprint("\x89Leaderboard Commands:\nretry exit findmap changelevel spba_clearcheats", true)
|
||||
end
|
||||
else
|
||||
help = true
|
||||
end
|
||||
end
|
||||
|
||||
Flags = $ & !(F_SPBATK | F_SPBEXP | F_SPBBIG | F_SPBJUS)
|
||||
|
Loading…
Reference in New Issue
Block a user