Author Topic: Damage Logging system  (Read 5299 times)

0 Members and 1 Guest are viewing this topic.

Offline monadko

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Damage Logging system
« 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!)

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Damage Logging system
« Reply #1 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 ?
« Last Edit: March 06, 2013, 10:49:42 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline bender180

  • Full Member
  • ***
  • Posts: 217
  • Karma: 42
    • Benders Villa
Re: Damage Logging system
« Reply #2 on: February 22, 2013, 12:11:58 PM »
This is most likely what you are looking for http://steamcommunity.com/sharedfiles/filedetails/?id=115872107
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Damage Logging system
« Reply #3 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline monadko

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Damage Logging system
« Reply #4 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 :(

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Damage Logging system
« Reply #5 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
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Damage Logging system
« Reply #6 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
« Last Edit: April 10, 2013, 10:15:34 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."