ULX

Author Topic: sui_scoreboard with UTime and Steam Avatars  (Read 118029 times)

0 Members and 1 Guest are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #75 on: July 12, 2010, 04:54:10 AM »
What's your UTeam config?
Experiencing God's grace one day at a time.

Offline NEM1019

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #76 on: July 12, 2010, 08:45:57 AM »
WAIT, Nvm lol I fixed it, the owner color was apparently causing it! XD

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #77 on: December 21, 2010, 08:33:44 PM »
Hi I've been using this for some time now [I had a different forum name but forgot it] on my sandbox server, but I have recently been jumping between fretta gamemodes and sandbox. The scoreboard conflicts with the custom freta boards, is there some way to have it only open in sandbox mode?

Thank you in advance!
My TTT server. Join the fun!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #78 on: December 22, 2010, 04:49:40 PM »
http://forums.ulyssesmod.net/index.php/topic,3650.msg14329.html#msg14329
Forgot i answered that years ago.
Used search bar of this thread 'disable' to find it.
The code should still be good.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #79 on: December 22, 2010, 05:45:26 PM »
Great, thanks so much, I was close to fixing it on my own, but had the code wrong :P
My TTT server. Join the fun!

Offline Botman

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #80 on: December 26, 2010, 08:19:04 AM »
Can we please get a more elaborate answer as to how to restrict the scoreboard to the sandbox gamemode only? Like said it doesn't work in all other gamemodes.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #81 on: December 26, 2010, 09:47:08 AM »
Go into the addons folder, into the SUI scoreboard folder, whatever version you downloaded (utime or no utime) from the first post of this thread, go into the lua folder, go into autorun folder, open sui_scoreboard.lua with a text editor (notepad is fine, another program editor that shows line numbers is better), count 13 lines down, should be a
Code: [Select]
else
and change it to
Code: [Select]
elseif string.lower(GAMEMODE.Name) == "sandbox" then
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Botman

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #82 on: December 26, 2010, 10:42:26 AM »
Yes, I did that, but now the scoreboard doesn't work at all. Have you tested that line?

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #83 on: December 26, 2010, 01:35:19 PM »
I actually had the same problem after trying it, I've just been running without the scoreboard the past week
My TTT server. Join the fun!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #84 on: December 26, 2010, 04:58:22 PM »
i've not tested recently. Don't have GMod installed. The time I posted that it worked (was tested), but Gmod has had several updates since.
He may have changed the gamemode table names for case sensitivity, etc.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #85 on: December 27, 2010, 12:50:18 AM »
Thanks for the help even without gmod installed, i will mess with it a little bit and post back if i have any solutions
My TTT server. Join the fun!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #86 on: December 27, 2010, 09:55:21 AM »
May try using GM.Name instead of GAMEMODE.Name . Seems looking over the wiki, I found an article explaining a global table (which "Name" would be a part of) gets loaded into GM. http://wiki.garrysmod.com/?title=Internal_gamemode_workings
(Though, later on it also mentions GAMEMODE table.
Megiddo, feel free to instruct me here. Why isn't my suggested line working? :P
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline krooks

  • Sr. Member
  • ****
  • Posts: 382
  • Karma: 32
  • I don't like video games.
    • Diamond Krooks
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #87 on: December 27, 2010, 04:01:13 PM »
I just gave GM.Name a try, no dice
My TTT server. Join the fun!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #88 on: December 27, 2010, 09:07:33 PM »
I found a function called Gmod.GetGameMode on the wiki. However, even it says the command is redundant as "GAMEMODE.Name" should contain the name.
So, let's see if there is a metatable issue (with Gmod or your server/gamemode), or a screw up in my code example.
Go to your server console, run the following. It should say Sandbox. If it does, means it's probably my syntax someway somehow.
Code: [Select]
lua_run print(GAMEMODE.Name)
If that fails, try
Code: [Select]
lua_run print(GM.Name)
Let me know if either return data, and if so, what they return.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: sui_scoreboard with UTime and Steam Avatars
« Reply #89 on: December 30, 2010, 05:29:50 PM »
GM is only loaded into the globals if your code is located in the gamemode files, I believe. Otherwise, you need to use GAMEMODE. (If I remember correctly!)
Experiencing God's grace one day at a time.