Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 07:05:50 PM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: ttt_print_damagelog HELP!
Pages: [1]
Author Topic: ttt_print_damagelog HELP!  (Read 3747 times)
Predator
Poster

Posts: 66


« on: July 03, 2011, 07:15:10 AM »

i wish the admins are able to using ttt_print_damagelog. Also If the rounds has been ended,other players be able to using the command.

But i don't know how to modify it. Please help me!
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #1 on: July 03, 2011, 07:21:18 AM »

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...?
« Last Edit: July 03, 2011, 07:25:04 AM by Mr. Gash »
Predator
Poster

Posts: 66


« Reply #2 on: July 03, 2011, 08:03:47 AM »

Thanks!

that means

other users(not admin) are able to use ttt_print_damagelog if the round is ended. :D
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #3 on: July 03, 2011, 08:04:50 AM »

Thanks!

that means

other users(not admin) are able to use ttt_print_damagelog if the round is ended. :D

But they already can do that...
Predator
Poster

Posts: 66


« Reply #4 on: July 03, 2011, 08:35:49 AM »

really? i didnt know that , thanks ! :D
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: ttt_print_damagelog HELP! « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.011 seconds with 17 queries.