ULX

Author Topic: Utime -- Show how long your players have been connected this session and total  (Read 553817 times)

0 Members and 3 Guests are viewing this topic.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Utime simply keeps track of session and total time for players and puts an info box in the top right hand side of the screen. Clients can enable/disable the HUD element as well as set their own colors and positions.

Screenshot when not looking a player:


Screenshot when looking at another player (there's a nice sliding animation when it opens/closes too):




Download: http://ulyssesmod.net/archive/Utime/Utime-v1_44.zip
« Last Edit: January 26, 2016, 10:23:21 AM by Megiddo »
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Looks nice.. now integrate it into your scoreboard too! =)

Good work.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Nice Megiddo!

Re: Scoreboard integration
Well, we don't really have a scoreboard. Just a fixed-because-a-gmod-update-broke-it re-release of a scoreboard SuicideBananna released.
He was active here for a while and gave Megiddo permission to re-release the fixed board since it works well with UTeam.
:P
There are still items that I believe SuicideBananna had planned for the board that haven't been completed.
Perhaps one day he'll pick it back up.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
I know Jam.. I use sui_scoreboard too.. but as long as he doesn't release it, it would be okay to hack it for your server. I hacked my scoreboard to show the players time where it used to show their XFire account.


Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
New version, no longer shows with the camera equipped.
Experiencing God's grace one day at a time.

Offline blacksythe

  • Newbie
  • *
  • Posts: 38
  • Karma: -1
IM currentrly using big_timespent and i modified it to remove the points and display on the left hand side, you code your differently what co-ordinates (for lack of a better word) would i need to enter to make it appear on the left hand side.

My reasons being my admins use it as a guide to catch death matchers and it looks better left alligned.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Where it creates the panel in cl_utime.lua, simply specify the location you want.
Experiencing God's grace one day at a time.

Offline blacksythe

  • Newbie
  • *
  • Posts: 38
  • Karma: -1
i plan to switch to uteam shortly however is there anyway i can transfer old times over, In other words where do you store your times?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
The process of moving times over would be too complex for anyone but developers or developers who can hand-hold you through the process. Best way would be just to let the time to start over.
Experiencing God's grace one day at a time.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
New version!

v1.20 - *(01/03/08)*
   * [ADD] Client config to change colors and position of Utime HUD element, as well as the ability to disable it.
Experiencing God's grace one day at a time.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
New version!

v1.20 - *(01/03/08)*
   * [ADD] Client config to change colors and position of Utime HUD element, as well as the ability to disable it.


lol, you would =)
Oh... Megiddo...

Offline Lt.Smith

  • Newbie
  • *
  • Posts: 32
  • Karma: 4
Very nice, I was looking for something like this and then this showed up :) Thanks Megiddo. I have a question though:

I was looking through the code, because what I want to do is have one database with times for all our servers. The idea is that we then add a little bit of script into our forums that retrieves a player's total time spent to sex it up a bit. In any case, I looked through the code and I'm confused.

Code: [Select]
sql.QueryRow( "SELECT totaltime, lastvisit FROM utime WHERE player = " .. uid .. ";" ) I understand that this fetches the total time spent for the player, but nowhere do I see a require( "mysql" ) statement. Nor do I see an sql setup anywhere. As such, I suppose I have 2 questions:

1) What is the function of the SQL queries?
2) How can I edit this to work off a central database? I imagine the queries can be used as-is, but I still haven't figured out what database they're transmitting to.

Thanks in advance,
Smith

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
It's using litesql right now, so you just have to change the function calls and require mysql. :)
Experiencing God's grace one day at a time.

Offline Lt.Smith

  • Newbie
  • *
  • Posts: 32
  • Karma: 4
I love you :) Thanks!

Offline TehBigA

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Lol I love the way after I make the super customization that u make it too XD <3