Author Topic: Hide players from TTT Scoreboard  (Read 3673 times)

0 Members and 2 Guests are viewing this topic.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Hide players from TTT Scoreboard
« on: September 04, 2017, 12:15:39 PM »
I've been looking through the TTT hooks page but I can't find anything there that could help me with this. This is just a small idea I had to be able to hide certain players or ULib groups from the scoreboard, in-case someone wanted to keep an eye on something without it being obvious that they're there. Just wondering if anyone knows how to do that or has done it themself.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Hide players from TTT Scoreboard
« Reply #1 on: September 04, 2017, 04:17:51 PM »
You'll have to modify the scoreboard file. Find where it does the player loop and then set a conditional to skip any players (groups) you wish.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Hide players from TTT Scoreboard
« Reply #2 on: September 04, 2017, 05:03:39 PM »
You'll have to modify the scoreboard file. Find where it does the player loop and then set a conditional to skip any players (groups) you wish.
That's what I thought it was going to have to come to but I wanted a cleaner way to do it with an add-on. Oh well, I guess.

Sent from my XT1710-02 using Tapatalk

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: Hide players from TTT Scoreboard
« Reply #3 on: September 04, 2017, 08:01:00 PM »
Quote
TTTScoreboardColorForPlayer (ply)
Client
Called to determine what colour a player's name should be on the scoreboard. Hence, it must return a Color object, or return nil (or nothing at all). The "ply" parameter contains a player object, so you can for example check the player's SteamID and give certain people a special colour. Note that TTT also uses this hook for the default colours, so you should return nil for players that you do not want to do anything special with.

Have you tested trying to set the color of the player the exact same as the background?
I doubt it would work well, but might be something to try.
"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: Hide players from TTT Scoreboard
« Reply #4 on: September 04, 2017, 08:34:38 PM »
I did think about that, but I thought it would just leave a blank space in the middle with other values in the board still.

Sent from my XT1710-02 using Tapatalk

I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline monkeymacman

  • Newbie
  • *
  • Posts: 44
  • Karma: 13
Re: Hide players from TTT Scoreboard
« Reply #5 on: September 04, 2017, 09:44:55 PM »
I'm not sure of the specifics of it (right now on mobile), but maybe making a separate score group and maybe there's some way you could hide that (I think group:SetVisible(false) works)
« Last Edit: September 04, 2017, 09:50:21 PM by monkeymacman »

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Hide players from TTT Scoreboard
« Reply #6 on: September 04, 2017, 09:51:51 PM »
Interesting thought. You mean by using TTTScoreGroups to create another group? The issue I have is how do I make that group invisible.

I could probably use how Innocents can't see GROUP_NOTFOUND...

I'll take a look into it tomorrow.

Sent using Tapatalk. Owner of iViscosity Gaming.

I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline monkeymacman

  • Newbie
  • *
  • Posts: 44
  • Karma: 13
Re: Hide players from TTT Scoreboard
« Reply #7 on: September 04, 2017, 09:56:21 PM »

Interesting thought. You mean by using TTTScoreGroups to create another group? The issue I have is how do I make that group invisible.

I could probably use how Innocents can't see GROUP_NOTFOUND...

I'll take a look into it tomorrow.

Sent using Tapatalk. Owner of iViscosity Gaming.
Yes, that's what I mean. And I am 90% sure you should be able to use :SetVisible because after a quick look the scoreboard and some point checka if there's less than 1 player in a scoregroup and if so uses that function to hide it, but I'm not sure if that hides everybody in it, or just the label itself.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Hide players from TTT Scoreboard
« Reply #8 on: September 04, 2017, 10:08:37 PM »
Yes, that's what I mean. And I am 90% sure you should be able to use :SetVisible because after a quick look the scoreboard and some point checka if there's less than 1 player in a scoregroup and if so uses that function to hide it, but I'm not sure if that hides everybody in it, or just the label itself.
I can test it tomorrow. It seems to hide the entire group (for example there is no Spectators tab if there is no one spectating). Thanks for the help. I'll test it out tomorrow when I'm home from school and see how it works.


Sent using Tapatalk. Owner of iViscosity Gaming.

I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.