Ulysses

Ulysses Stuff => Suggestions => Topic started by: monadko on February 21, 2013, 07:52:12 PM

Title: Damage Logging system
Post by: monadko on February 21, 2013, 07:52:12 PM
Like in TTT, I wanna damage logging system! It would be good for finding out bad guys :)
(sorry not good at English!)
Title: Re: Damage Logging system
Post by: nathan736 on February 21, 2013, 08:57:42 PM
WRONG AREA MOVE TO DEV >: (
ANYWAYS
look at the ttt code for dmg logs and think about what you want to log ?, thats the great question what do you want to log ?
Title: Re: Damage Logging system
Post by: bender180 on February 22, 2013, 12:11:58 PM
This is most likely what you are looking for http://steamcommunity.com/sharedfiles/filedetails/?id=115872107
Title: Re: Damage Logging system
Post by: JamminR on February 22, 2013, 02:39:50 PM
WRONG AREA MOVE TO DEV >: (
Seems like they want it in ULX (Suggestions), not how to code it (developer's corner).
This area is fine.

Monadko, we pretty much try to avoid non-base/Sandbox gamemode specific tools within ULib/ULX itself.
That doesn't mean someone can't write a module for ULib to use though and release it.
Title: Re: Damage Logging system
Post by: monadko on March 05, 2013, 11:00:18 PM
Seems like they want it in ULX (Suggestions), not how to code it (developer's corner).
This area is fine.

Monadko, we pretty much try to avoid non-base/Sandbox gamemode specific tools within ULib/ULX itself.
That doesn't mean someone can't write a module for ULib to use though and release it.
Oh, I meant Sandbox.. sorry :(
Title: Re: Damage Logging system
Post by: nathan736 on March 12, 2013, 10:18:24 AM
ulx tracks killing so... but if you absolutly must track damage you probably should look at the ttt code for that as its a great example although tracking damage is really a bad idea if you save it because shooting people with a fast gun eg mini gun that deals like 2 dmg will result in  50 lines from one death
Title: Re: Damage Logging system
Post by: nathan736 on April 10, 2013, 09:02:20 AM
going to bump this for a few bits of help
to track dammage you would use this hook
Code: [Select]
function supercoolscript(player, attacker,hp,hurt)
local aname = attacker:GetName()
local pname = player:GetName()
if player = attacker then return end
if player.attacker.hurt = "" then
player.attacker = aname.. "did ".. hurt .. " dammage  to ".. pname .."x"
end
Hook.Add("PlayerHurt","dmg tracker2000" ,supercoolscript)
Hook.Add("PlayerHurt","dmg tracker2000" ,supercoolscript)
important notes this does not get called client side
-- ignore this was going to code multiplier to reduce redundent dmg player.attacker.hurt.times =  player.attacker.hurt.times +1