mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-10 06:41:53 +00:00
Removed print of end of spree messages if they're disabled
This commit is contained in:
parent
5df1a0ac41
commit
380aba96cb
1 changed files with 4 additions and 2 deletions
|
@ -243,7 +243,9 @@ function sprees.onPlayerSpree(clientId, type, sourceId)
|
||||||
end
|
end
|
||||||
|
|
||||||
function sprees.onPlayerSpreeEnd(clientId, causeId, type)
|
function sprees.onPlayerSpreeEnd(clientId, causeId, type)
|
||||||
if type == sprees.RECORD_DEATH then
|
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 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!",
|
local msg = string.format("^7%s^d was the first victim of ^7%s ^dafter ^3%d ^d%ss!",
|
||||||
players.getName(causeId),
|
players.getName(causeId),
|
||||||
|
@ -258,7 +260,7 @@ function sprees.onPlayerSpreeEnd(clientId, causeId, type)
|
||||||
elseif type == nil then
|
elseif type == nil then
|
||||||
for i = 0, sprees.RECORD_NUM - 1 do
|
for i = 0, sprees.RECORD_NUM - 1 do
|
||||||
if i ~= sprees.RECORD_DEATH then
|
if i ~= sprees.RECORD_DEATH then
|
||||||
if playerSprees[clientId][i] > spreeMessagesByType[i][1]["amount"] then
|
if settingSpreeMessages ~= 0 and bits.hasbit(settingSpreeMessages, 2^i) and playerSprees[clientId][i] > spreeMessagesByType[i][1]["amount"] then
|
||||||
local msg = ""
|
local msg = ""
|
||||||
|
|
||||||
if clientId == causeId then
|
if clientId == causeId then
|
||||||
|
|
Loading…
Reference in a new issue