From d31c6ff0a018ea6287cafe218ec48d8d89c1c0ab Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Mon, 13 Mar 2017 17:19:35 +0100 Subject: [PATCH] Fixed maxspree message being printed when first spree > 5 --- luamods/wolfadmin/game/sprees.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/luamods/wolfadmin/game/sprees.lua b/luamods/wolfadmin/game/sprees.lua index 4898741..afab349 100644 --- a/luamods/wolfadmin/game/sprees.lua +++ b/luamods/wolfadmin/game/sprees.lua @@ -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),