mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-22 12:21:43 +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")
|
local settingSpreeMessages = settings.get("g_spreeMessages")
|
||||||
if settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^type) and #spreeMessagesByType[type] > 0 then
|
if settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^type) and #spreeMessagesByType[type] > 0 then
|
||||||
local spreeMessage = spreeMessages[type][currentSpree]
|
local spreeMessage = spreeMessages[type][currentSpree]
|
||||||
|
local maxSpreeMessage = spreeMessagesByType[type][#spreeMessagesByType[type]]
|
||||||
|
|
||||||
if spreeMessage then
|
if spreeMessage then
|
||||||
local msg = string.format("^1%s SPREE! ^*%s ^*%s ^d(^3%d ^d%ss in a row!)",
|
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
|
end
|
||||||
|
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \""..msg.."\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \""..msg.."\";")
|
||||||
elseif currentSpree % 5 == 0 then
|
elseif currentSpree % 5 == 0 and currentSpree > maxSpreeMessage["amount"] then
|
||||||
local maxSpreeMessage = spreeMessagesByType[type][#spreeMessagesByType[type]]
|
|
||||||
|
|
||||||
local msg = string.format("^1%s SPREE! ^*%s ^*%s ^d(^3%d ^d%ss in a row!)",
|
local msg = string.format("^1%s SPREE! ^*%s ^*%s ^d(^3%d ^d%ss in a row!)",
|
||||||
string.upper(spreeNames[type]),
|
string.upper(spreeNames[type]),
|
||||||
players.getName(clientId),
|
players.getName(clientId),
|
||||||
|
|
Loading…
Reference in a new issue