Damage log

This question was answered, but the answers didn’t fit my need.
I want to have a damage log to where a admin can type something in console and the list of who damaged who with what at what time pops up, but I only want the previous round to show up in the console. I also want it to make a log in the console.

I’d be happy to help you out with this and I have some ideas in mind, but it might take me a bit to get it to you as I have midterms this week. I guess some design questions come to mind:

  1. Do you want the damage log to appear in the console or in a derma window? (Derma window is probably going to be easier to read through)
  2. Do you want the damage log to be logged with the normal server logs or have its own log file?
  3. Just making sure: This is for TTT, right? (I’m not too familiar with its API so I might have to study it).

1: Console is fine unless derma is easier for you
2: I would like to have it in the same file as the normal logs
3: No, sorry, this is for a Jail Break server.

Just making sure: this jailbreak, right? http://www.facepunch.com/threads/1136643

Not that exact one, but yes, that type.

I just need to know the function or hook that is called when a round begins or ends to fill your “only shows the previous round” bit. Is it a fretta gamemode?

I am not quite sure, are there any characteristics that define a fretta gamemode?

Short play time, simple game mechanics and UI

Is it alright for you to post the source of the gamemode?

I think it’s a fretta gamemode from what Kung Fu said. Also the fretta skeleton matches the gamemode.
(Just talked to my friend, he said he didn’t want to put the gamemode up if at all posible.)

-snip wrong thread -

Hello Bob.

You’re looking into modifying the hook: [lua]GM:OnEntityTakeDamage()[/lua] and adding clauses for reading the ammount of damage dealt, from who and by whom, and store them wherever you want them (text file for example)

[lua]function GM:EntityTakeDamage(victim, weapon, killer, ammount, dmginfo)
if (ammount > 0) then
if victim:IsPlayer() and killer:IsPlayer() then
local damage = dmginfo:GetDamage()
–Procedure for storing damage–

Why not just hook into it? Saves the trouble of re-defining the function, no?

I just posted it in the general form, He can do whatever he pleases with it ^^
Thats the way I handle player vs NPC damage scaling by level+equipment’s ATK in my MMORPG gamemode

OH, I realize now, yeah no need to MODIFY it, just make use of it