From 8e181447b2f85a730844563509158caf375bcee3 Mon Sep 17 00:00:00 2001 From: Timo Smit Date: Mon, 13 Mar 2017 10:09:19 +0100 Subject: [PATCH] Regardless of messages, reset sprees accordingly --- luamods/wolfadmin/game/sprees.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luamods/wolfadmin/game/sprees.lua b/luamods/wolfadmin/game/sprees.lua index 4965486..16fb70f 100644 --- a/luamods/wolfadmin/game/sprees.lua +++ b/luamods/wolfadmin/game/sprees.lua @@ -247,8 +247,8 @@ end function sprees.onPlayerSpreeEnd(clientId, causeId, type) local settingSpreeMessages = settings.get("g_spreeMessages") - if type == sprees.RECORD_DEATH and settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^type) then - if playerSprees[clientId][sprees.RECORD_DEATH] > spreeMessagesByType[sprees.RECORD_DEATH][1]["amount"] then + if type == sprees.RECORD_DEATH then + if settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^type) and playerSprees[clientId][sprees.RECORD_DEATH] > spreeMessagesByType[sprees.RECORD_DEATH][1]["amount"] then local msg = string.format("^7%s^d was the first victim of ^7%s ^dafter ^3%d ^d%ss!", players.getName(causeId), players.getName(clientId), @@ -292,9 +292,9 @@ function sprees.onPlayerSpreeEnd(clientId, causeId, type) et.trap_SendConsoleCommand(et.EXEC_APPEND, "cchat -1 \""..msg.."\";") end - - playerSprees[clientId][i] = 0 end + + playerSprees[clientId][i] = 0 end end end