• Print

Author Topic: Damagelogs with console command  (Read 4933 times)

0 Members and 1 Guest are viewing this topic.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Damagelogs with console command
« on: June 12, 2016, 01:24:24 pm »
I was wondering if there was a way to open up the Damagelogs with a console command instead of the F8 key. A staff on my server has a broken F8 key but I don't want to change it for everyone (especially because I'm so used to F8), so is there a console command for the TTT Damagelogs (Not ttt_print_damagelogs, but the addon)


EDIT: Nevermind, just changed a little bit of code and fixed it.


Code: Lua
  1. if input.IsKeyDown(self.Key) or input.IsKeyDown( KEY_F7 ) and not self.pressed_key then
« Last Edit: June 12, 2016, 01:29:15 pm by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Damagelogs with console command
« Reply #1 on: June 12, 2016, 01:58:29 pm »
A much easier way to change this and a way that will allow you to update the damagelogs without having to copy this change over would be to simply edit the config, where there is a value for which key should open the damagelogs. https://github.com/Tommy228/TTTDamagelogs/blob/6fc3ab624ed4e2590f82427159b16cb071f33a0e/lua/damagelogs/config/config.lua#L24
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Damagelogs with console command
« Reply #2 on: June 12, 2016, 01:59:47 pm »
I know, but like I said, I wanted to keep it as F8 as thats what I'm used to and other staff are used to so I wanted another option.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Damagelogs with console command
« Reply #3 on: June 12, 2016, 02:05:52 pm »
Searching the developers corner or releases section of the forum for damage logs should also find code for controlling damage log access with groups and perhaps the command needed. I didn't search, only remember it being discussed before.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Damagelogs with console command
« Reply #4 on: June 12, 2016, 02:07:32 pm »
No, I think you guys misunderstand what I was asking, I was trying to find ANOTHER way to access the damage logs, as well as F8 but I found it.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Damagelogs with console command
« Reply #5 on: June 13, 2016, 01:02:47 am »
Ah, ok. I thought you were changing the key. My bad.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

  • Print