Line 105 in admin.lua
local function PrintDamageLog(ply)
local pr = GetPrintFn(ply)
if (not ValidEntity(ply)) or ply:IsSuperAdmin() or GetRoundState() != ROUND_ACTIVE then
ServerLog(Format("%s used ttt_print_damagelog\n", IsValid(ply) and ply:Nick() or "console"))
pr("*** Damage log:\n")
if not dmglog_console:GetBool() then
pr("Damage logging for console disabled. Enable with ttt_log_damage_for_console 1.")
end
for k, txt in ipairs(GAMEMODE.DamageLog) do
pr(txt)
end
pr("*** Damage log end.")
else
if ValidEntity(ply) then
pr("You do not appear to be RCON or a superadmin, nor are we in the post-round phase!")
end
end
end
concommand.Add("ttt_print_damagelog", PrintDamageLog)
This lets admins use it (Just replace what is above with this):
local function PrintDamageLog(ply)
local pr = GetPrintFn(ply)
if (not ValidEntity(ply)) or ply:IsAdmin() or GetRoundState() != ROUND_ACTIVE then
ServerLog(Format("%s used ttt_print_damagelog\n", IsValid(ply) and ply:Nick() or "console"))
pr("*** Damage log:\n")
if not dmglog_console:GetBool() then
pr("Damage logging for console disabled. Enable with ttt_log_damage_for_console 1.")
end
for k, txt in ipairs(GAMEMODE.DamageLog) do
pr(txt)
end
pr("*** Damage log end.")
else
if ValidEntity(ply) then
pr("You do not appear to be RCON or an admin, nor are we in the post-round phase!")
end
end
end
concommand.Add("ttt_print_damagelog", PrintDamageLog)
I don't know what you mean by the second part...?