mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-21 20:01:18 +00:00
Fixed maxspree message being printed when first spree > 5
This commit is contained in:
parent
17ea943c64
commit
d31c6ff0a0
1 changed files with 2 additions and 3 deletions
|
@ -211,6 +211,7 @@ function sprees.onPlayerSpree(clientId, type, sourceId)
|
|||
local settingSpreeMessages = settings.get("g_spreeMessages")
|
||||
if settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^type) and #spreeMessagesByType[type] > 0 then
|
||||
local spreeMessage = spreeMessages[type][currentSpree]
|
||||
local maxSpreeMessage = spreeMessagesByType[type][#spreeMessagesByType[type]]
|
||||
|
||||
if spreeMessage then
|
||||
local msg = string.format("^1%s SPREE! ^*%s ^*%s ^d(^3%d ^d%ss in a row!)",
|
||||
|
@ -225,9 +226,7 @@ function sprees.onPlayerSpree(clientId, type, sourceId)
|
|||
end
|
||||
|
||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \""..msg.."\";")
|
||||
elseif currentSpree % 5 == 0 then
|
||||
local maxSpreeMessage = spreeMessagesByType[type][#spreeMessagesByType[type]]
|
||||
|
||||
elseif currentSpree % 5 == 0 and currentSpree > maxSpreeMessage["amount"] then
|
||||
local msg = string.format("^1%s SPREE! ^*%s ^*%s ^d(^3%d ^d%ss in a row!)",
|
||||
string.upper(spreeNames[type]),
|
||||
players.getName(clientId),
|
||||
|
|
Loading…
Reference in a new issue