ULX

Poll

Was this module useful, and helpful?

Yes :)
134 (93.7%)
No :(
9 (6.3%)

Total Members Voted: 143

Author Topic: Utime Hour Changer Addon :) [2.18v]  (Read 84920 times)

0 Members and 2 Guests are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Utime Hour Changer Addon :)
« Reply #15 on: December 15, 2013, 05:55:21 PM »
Orilla, Utime, and this addon to adjust times in it, has nothing to do with player access.
5 hours, or a 1000, UTime will only show how many.
If you are using another addon that adjusts permission based on time played, it's possible it has its own tracking.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Utime Hour Changer Addon :)
« Reply #16 on: December 15, 2013, 07:41:10 PM »
Hi Guys


I used this on single player, and set myself down to the equivelant of user. I could still use this command though, even though I wasnt a super admin. Do you know why this is?



THanks
-Orrila

I'll check the addon later, but if something is broken with permissions it shouldn't be related to my addon. My addon doesn't even have permission control except for when you set access to players for the use of this addon. I'll check it anyways...
Basically is my answer anyways \/

Orilla, Utime, and this addon to adjust times in it, has nothing to do with player access.
5 hours, or a 1000, UTime will only show how many.
If you are using another addon that adjusts permission based on time played, it's possible it has its own tracking.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline orrila

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: Utime Hour Changer Addon :)
« Reply #17 on: December 15, 2013, 11:48:47 PM »
Hi again


Sorry, I just think it is related to your addon. It may not be - your the coder and all so you know, but;
It was only the allow change time command in Apple's Creations tab that I uncheck for user, but checked for superadmin.
All the other commands I could not use.
I then, when set to not-superadmin was able to use this command.

But hey, this was in single player and that couldve been the issue. So I will check on a listen server soon, and when I have a new pc in about a months time, I can run a local server and run via that to check to.


THanks

-Orrila

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Utime Hour Changer Addon :)
« Reply #18 on: December 16, 2013, 02:50:23 AM »
Thank you for your concern. I've looked into this though, and there were no issues that were detected, and that were somewhat similar to your issues. So as far as I know, this addon still remains to not have any issues. I had a few people test it on their server, and it all works fine as dandy. I hope you get your issue fixed.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline orrila

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: Utime Hour Changer Addon :)
« Reply #19 on: December 16, 2013, 05:49:05 AM »
Thank you for your concern. I've looked into this though, and there were no issues that were detected, and that were somewhat similar to your issues. So as far as I know, this addon still remains to not have any issues. I had a few people test it on their server, and it all works fine as dandy. I hope you get your issue fixed.

Well, thanks.
Its prob the fact im on single player that is why its not working. I'll test in multiplayer sometime. Thanks a million though for the help.


-Orrila

Offline DendeSon

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
  • No.
    • Gentlemen Gaming
Re: Utime Hour Changer Addon :)
« Reply #20 on: December 23, 2013, 02:51:16 PM »
Any way to view a players time using this if the player is not on the server?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Utime Hour Changer Addon :)
« Reply #21 on: December 23, 2013, 05:03:38 PM »
Nope, sorry. That would be impossible.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline orrila

  • Newbie
  • *
  • Posts: 15
  • Karma: 0
Re: Utime Hour Changer Addon :)
« Reply #22 on: December 24, 2013, 12:24:57 AM »
Any way to view a players time using this if the player is not on the server?

Not with this, but certainly with some changes to Utime, or looking in logs or something.

Offline Chironex

  • Full Member
  • ***
  • Posts: 197
  • Karma: 11
  • Formerly known as Kyzer
Re: Utime Hour Changer Addon :)
« Reply #23 on: March 18, 2014, 11:39:36 PM »
I did exactly the same thing as this addon few days ago...

Anyway, I looked your script and didn't understand why you made it so complex. Here is mine:
Code: [Select]
if file.Exists("autorun/cl_utime.lua", "LUA") then

function ulx.sethours( calling_ply, target_plys, hours )

for i=1, #target_plys do

local v = target_plys[ i ]
local removeSessionTime = true

if ( hours < 0 ) then
hours = math.max( ( v:GetUTime() / 3600 ) + hours, 0 )
removeSessionTime = false
end

local time = (hours * 3600)

if ( removeSessionTime ) then
time = time - (time % 3600) - v:GetUTimeSessionTime()
end

v:SetUTime( time )
end

ulx.fancyLogAdmin( calling_ply, "#A set #T's hours to #i", target_plys, hours )
end

local sethours = ulx.command( "User Management", "ulx sethours", ulx.sethours, "!sethours" )
sethours:addParam{ type=ULib.cmds.PlayersArg }
sethours:addParam{ type=ULib.cmds.NumArg, min = -10000, max = 10000, default = 0, hint = "hours", ULib.cmds.optional, ULib.cmds.round }
sethours:defaultAccess( ULib.ACCESS_ADMIN )
sethours:help( "Sets target(s)'s UTime hours." )

end

Negative value will remove hours ;)
« Last Edit: April 28, 2014, 01:27:34 PM by Chironex »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Utime Hour Changer Addon :)
« Reply #24 on: April 05, 2014, 03:17:06 PM »
I did exactly the same thing as this addon few days ago...

Anyway, I looked your script and didn't understand why you made it so complex. Here is mine:
Code: [Select]
if ( file.Exists("autorun/cl_utime.lua", "LUA") ) then

function ulx.sethours( calling_ply, target_plys, hours )

for ( i = 1, #target_plys ) do
local target_ply = target_plys[ i ]
if ( hours < 0 ) then
hours = math.max( ( target_ply:GetUTime() / 3600 ) + hours, 0 )
end
target_ply:SetUTime( hours * 3600 )
end

ulx.fancyLogAdmin( calling_ply, "#A set #T's hours to #i", target_plys, hours )
end

local sethours = ulx.command( "User Management", "ulx sethours", ulx.sethours, "!sethours" )
sethours:addParam{ type = ULib.cmds.PlayersArg }
sethours:addParam{ type = ULib.cmds.NumArg, min = -10000, max = 10000, default = 0, hint = "hours", ULib.cmds.optional, ULib.cmds.round }
sethours:defaultAccess( ULib.ACCESS_ADMIN )
sethours:help( "Sets target(s)'s UTime hours." )

end

Negative value will remove hours ;)

I made mine special for a mysql utime, and I just never removed the other code, as it didn't really affect the people who were using mysql lite servers
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline jadon999

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Utime Hour Changer Addon :)
« Reply #25 on: May 24, 2014, 08:26:54 AM »
Hey Chaos! This addon looks great but when i try to install it it doesnt work,
Methods ive tried to install,
Ive put the whole folder inside my addons folder(didnt think it would work) then
I put the lua inside the lua/ulx/modules/sh.
After i did both ways i try to go and give permission to a rank your name "Apples Creations" Doesnt Not pop up on groups perm.
I also restarted it and nothing happend. i Have ulx.3.61 and ulib 2.51
Any help please!

-Thanks

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Utime Hour Changer Addon :)
« Reply #26 on: May 31, 2014, 10:36:07 AM »
Hey Chaos! This addon looks great but when i try to install it it doesnt work,
Methods ive tried to install,
Ive put the whole folder inside my addons folder(didnt think it would work) then
I put the lua inside the lua/ulx/modules/sh.
After i did both ways i try to go and give permission to a rank your name "Apples Creations" Doesnt Not pop up on groups perm.
I also restarted it and nothing happend. i Have ulx.3.61 and ulib 2.51
Any help please!

-Thanks


I'm sorry, but I really don't understand what the issue is. All this mod changed the players utime, but I think you're getting confused on what this mod does, or with something else.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Valgoid

  • Full Member
  • ***
  • Posts: 103
  • Karma: -15
  • Wanna Be Lua King
Re: Utime Hour Changer Addon :)
« Reply #27 on: June 11, 2014, 09:11:54 AM »
I used this but everytime I would restart the server it would lose the time that I had set and go back to the original. Anyway to fix that?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Utime Hour Changer Addon :)
« Reply #28 on: June 17, 2014, 07:24:40 AM »
I used this but everytime I would restart the server it would lose the time that I had set and go back to the original. Anyway to fix that?

Are you using mysql utime, and if you are then ummm ye. If you are not, are you using the official utime?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Navarone

  • Newbie
  • *
  • Posts: 2
  • Karma: -1
Re: Utime Hour Changer Addon :)
« Reply #29 on: July 22, 2014, 04:33:18 AM »
Is there a console command, or do I have to actually be on the server to use it?