Ulysses Stuff > Suggestions

Damage Logging system

<< < (2/2)

nathan736:
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

nathan736:
going to bump this for a few bits of help
to track dammage you would use this hook

--- Code: ---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)

--- End code ---
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

Navigation

[0] Message Index

[*] Previous page

Go to full version