ULX

Author Topic: Scoreboard  (Read 4718 times)

0 Members and 1 Guest are viewing this topic.

Offline SkuD

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Scoreboard
« on: July 11, 2007, 11:18:02 AM »
First off I would like to say that ulx/ulib is a great program.  The only thing that in my eyes is missing from it is having its own scoreboard/teams.  I know you have uteam support, but last time I tried, the scoreboard was not working and I had absolutely no luck finding any replacements to work with it.  So my question is, is there anything that is working that anyone knows of for uteam and/or ulx/ulib.  I really want a scoreboard that displays group names/colors, without having to resort too getting SS (It is too buggy and causes a lot of server crashes).

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Scoreboard
« Reply #1 on: July 11, 2007, 01:21:09 PM »
Sui scoreboard is really the one that works best with ULX/UTeam, but unfortunately it hasn't been released to the public yet. Stop on by at our server if you want to see it.
Experiencing God's grace one day at a time.

Offline atomicspark

  • Full Member
  • ***
  • Posts: 196
  • Karma: 12
Re: Scoreboard
« Reply #2 on: July 11, 2007, 01:22:33 PM »
There is UTeam that is a separate add-on. Find that here. SUI Scoreboard will be released (hopefully) after the next Garry's Mod update.

The reason why they don't include stuff like that because they want to keep ULX simple. An admin add-on should work in the background and clients don't really need to see/use it. This is how ULX and SS differ.

Offline SkuD

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Scoreboard
« Reply #3 on: July 11, 2007, 02:22:57 PM »
Yeah I agree, I know about Uteam, and I know that the scoreboard for it does not work.  I know you guys are working on the new version of sui_scoreboard, but I was merely asking if there was anything out there that existed at all for uteam or anything else BESIDES ServerSecure, I really despise that admin program, it crashes and has too many bugs.  Ulx is great and I've already added in alot of my own custom features, but I have not yet got into vgui/gui and I do not know how to make a scoreboard... yet.

Offline atomicspark

  • Full Member
  • ***
  • Posts: 196
  • Karma: 12
Re: Scoreboard
« Reply #4 on: July 11, 2007, 05:04:05 PM »
Not that I know of, sorry. Most servers that seem to have made their own (or fixed/edited sui) don't seem to redistribute it. We're all out of luck for a few weeks.

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
Re: Scoreboard
« Reply #5 on: July 12, 2007, 12:37:36 AM »
It's easy to modify the default scoreboard to display the group name in front of the player name, and changing the player row color to his group color.

And as i'm a nice guy i'll tell how to do, basically ;)

Look into folder garrysmod/gamemodes/sandbox/gamemode/scoreboard and open the file player_row.lua

In the function PANEL:Paint(), there is a big part which define player row colors:
Code: [Select]
local color = Color( 100, 150, 245, 255 )

if ( self.Armed ) then
color = Color( 110, 160, 245, 255 )
end

if ( self.Selected ) then
color = Color( 50, 100, 245, 255 )
end

if ( self.Player:Team() == TEAM_CONNECTING ) then
color = Color( 200, 120, 50, 255 )

elseif ( self.Player:IsAdmin() ) then
color = Color( 30, 200, 50, 255 )
end


if ( self.Player == LocalPlayer() ) then

color.r = color.r + math.sin( CurTime() * 8 ) * 10
color.g = color.g + math.sin( CurTime() * 8 ) * 10
color.b = color.b + math.sin( CurTime() * 8 ) * 10

end

You can replace all this part with
Code: [Select]
local color = team.GetColor(self.Player:Team()) // set the player row color to his team/group color

if ( self.Player:Team() == TEAM_CONNECTING ) then //the team of players that are joining the server.
color = Color( 200, 120, 50, 255 ) //Replace these 4 numbers if you want to change their colors (RGBA).
end



And for the team name in front of the player name,

Still in the same file, locate the function PANEL:UpdatePlayerData(), locate the line:
Code: [Select]
self.lblName:SetText( self.Player:Nick() )And replace it with
Code: [Select]
self.lblName:SetText( team.GetName(self.Player:Team()).." "..self.Player:Nick() )
« Last Edit: July 12, 2007, 01:32:53 AM by Kyzer »

Offline SkuD

  • Newbie
  • *
  • Posts: 12
  • Karma: 0
Re: Scoreboard
« Reply #6 on: July 12, 2007, 06:40:29 AM »
Neat, will try messing with it later today.  Like I said, I'm still new to garry's mod, and I can code, but lua takes some getting used too, and I haven't even bothered with scoreboards yet.  This will definately help for the time being, much appricated!  :)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Scoreboard
« Reply #7 on: July 12, 2007, 03:20:39 PM »
I thought Garry had made it so that you couldn't edit the default scoreboard anymore. I think it gets repulled from the GCF.
I also forget reasons why, but seem to recall some of that. Or, I just dreamed all that.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline atomicspark

  • Full Member
  • ***
  • Posts: 196
  • Karma: 12
Re: Scoreboard
« Reply #8 on: July 12, 2007, 03:24:31 PM »
You download it from server now. You are correct sir! This fixed the big problem with script enforcer.