Ulysses

Ulysses Stuff => Releases => Topic started by: Bite That Apple on April 08, 2013, 04:31:29 PM

Title: Utime Hour Changer Addon :) [2.18v]
Post by: Bite That Apple on April 08, 2013, 04:31:29 PM
Utime Hour Changer

Introducing a plugin to change your Total Playing Hours, made by Mr. Apple and help from Shoop Da Whoop.
This plugin is simple to use, doesn't have any bugs what so ever(99.8% Guaranteed). It's as simple to use as !kick, !god, and !slap, same use too! :)

Please Keep Note:
If you like this addon, I would really appreciate a "Compliment" Karma which is located next to my name. That's how I know you care :)
Another thing is, if people really want a MySQL version of this, I can most likely do it. Only if people want it though.
You must be registered and logged in the ulx forum to see the download link which is found under the preview image


Requirements:
Ulx 3.50+
ULib 2.50+
Current version of Utime

HOW TO USE:
You can type !utime PLAYERNAME HOUR or do !menu and go to "Apple's Creations" and find "Set Utime". It's very simple to use.
[Ex.] !utime Justin 1337     -> This would set whatever player's name was 'Justin' to 1337 hours.

FEATURES:


TO-DO-LIST:
Add MySQL support? - Works with utime_sql


KNOWN BUGS:
Nothing that I see


Preview:
(http://i1044.photobucket.com/albums/b449/chaos13125/2013-03-17_00002_zps0624b6f3.jpg)


DOWNLOAD LINK BELOW
You must be registered and logged in the ulx forum to see the download link which is found under the preview image
Title: Re: Utime - Change your hours mod for XGUI :)
Post by: MrPresident on April 08, 2013, 04:40:51 PM
I'm not sure a release thread with 3 replies warrented a new thread for a new version number. Also, I might be picking but at first glance I thought you were posting a new version of UTime. I think your post title may be a little misleading.
Title: Re: Utime - Change your hours mod for XGUI :)
Post by: Bite That Apple on April 08, 2013, 04:46:44 PM
I'm not sure a release thread with 3 replies warrented a new thread for a new version number. Also, I might be picking but at first glance I thought you were posting a new version of UTime. I think your post title may be a little misleading.

What should I call it then?
Title: Re: Utime - Change your hours mod for XGUI :)
Post by: MrPresident on April 08, 2013, 04:53:05 PM
Call it what you want, I'm just giving you constructive criticism. I told you what I saw at first glance.
Title: Re: Utime - Change your hours mod for XGUI :)
Post by: Bite That Apple on April 08, 2013, 05:06:59 PM
Call it what you want, I'm just giving you constructive criticism. I told you what I saw at first glance.

Okay, I understand what you mean. I've changed the name of it now and I think it's a bit more understandable.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on April 08, 2013, 05:09:12 PM
Also, sorry to the people who were waiting for this addon, I was busy with other things, anywho. I actually thought I uploaded it to ulx forums, but I must of forgotten, if it wasn't for about the 16 Private Messages I have and a few emails from some random people about this I most likely wouldn't have returned any time soon.

So here it is!
Title: Re: Utime Hour Changer Addon :)
Post by: MrPresident on April 08, 2013, 07:30:35 PM
Good work! Thanks for sharing your add-on with the community.
Title: Re: Utime Hour Changer Addon :)
Post by: Smoot178 on April 10, 2013, 01:12:00 PM
Thank you :)
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on June 13, 2013, 03:21:49 PM
Updated.
Title: Re: Utime Hour Changer Addon :)
Post by: Runnix on July 23, 2013, 08:35:46 AM
Awesome ! 8)
Title: Re: Utime Hour Changer Addon :)
Post by: Daymian on September 21, 2013, 03:37:20 PM
Bug: When anyone in the server hit's my selected 8 hours, they are set to the selected group "Sexy Whale" but the problem is that ANYONE (including staff/owner) will get bumped down. Looking to fix this
Title: Re: Utime Hour Changer Addon :)
Post by: JamminR on September 21, 2013, 06:47:32 PM
Daymian, UTime, and Utime hour changer (this discussion) do not change anyone's groups.
They simply keep track of someones time, or allow editing of that time.
You seem to have UTime confused with something else.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on November 30, 2013, 03:02:45 AM
This is my most proud of addon ever, the addon that made me want to even learn lua, and it most likely it one of the community's least appreciated addons, and 'needed' addons. Makes me sad :(
Well, it works for me so I'm okay with it. :p
Title: Re: Utime Hour Changer Addon :)
Post by: Megiddo on November 30, 2013, 07:53:53 AM
Well, it works for me so I'm okay with it. :p

That's all that really matters in the end when you're offering something up to the community for free. :P
Title: Re: Utime Hour Changer Addon :)
Post by: orrila on December 15, 2013, 02:15:25 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
Title: Re: Utime Hour Changer Addon :)
Post by: JamminR 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.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple 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.
Title: Re: Utime Hour Changer Addon :)
Post by: orrila 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
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple 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.
Title: Re: Utime Hour Changer Addon :)
Post by: orrila 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
Title: Re: Utime Hour Changer Addon :)
Post by: DendeSon 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?
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on December 23, 2013, 05:03:38 PM
Nope, sorry. That would be impossible.
Title: Re: Utime Hour Changer Addon :)
Post by: orrila 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.
Title: Re: Utime Hour Changer Addon :)
Post by: Chironex 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 ;)
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple 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
Title: Re: Utime Hour Changer Addon :)
Post by: jadon999 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
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple 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.
Title: Re: Utime Hour Changer Addon :)
Post by: Valgoid 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?
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple 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?
Title: Re: Utime Hour Changer Addon :)
Post by: Navarone 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?
Title: Re: Utime Hour Changer Addon :)
Post by: Decicus on July 22, 2014, 12:14:59 PM
Is there a console command, or do I have to actually be on the server to use it?

The console command is "ulx settime Player number", where you replace the player and the number with what you want.
Title: Re: Utime Hour Changer Addon :)
Post by: Malkeur on August 02, 2014, 07:34:15 AM
Did you ever create a mySQL edition?
I'd really be interested in seeing utime for mysql.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on August 02, 2014, 03:26:38 PM
Did you ever create a mySQL edition?
I'd really be interested in seeing utime for mysql.

I did create my own version, but it's private because it only works for my servers. There are other ones on this forum; http://forums.ulyssesmod.net/index.php/topic,5737.30.html (http://forums.ulyssesmod.net/index.php/topic,5737.30.html)

Also, this addon works with this version, as I have checked.
Title: Re: Utime Hour Changer Addon :)
Post by: Malkeur on August 02, 2014, 05:18:43 PM
I now realize what you mean.

If you do release a ulx time changer that works with utime moo, that'd be awesome.
Title: Re: Utime Hour Changer Addon :)
Post by: DemonBrayden on September 27, 2014, 03:44:16 PM
Can i have the link to this for my gmod server??(Utime Hour Changer Addon)?
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on September 27, 2014, 05:10:23 PM
Can i have the link to this for my gmod server??(Utime Hour Changer Addon)?

download it here...
http://forums.ulyssesmod.net/index.php?action=dlattach;topic=6182.0;attach=583 (http://forums.ulyssesmod.net/index.php?action=dlattach;topic=6182.0;attach=583)
Title: Re: Utime Hour Changer Addon :)
Post by: Shalmendo on November 05, 2014, 11:51:00 AM
I'm sorry to report that the module for this isn't loading at all. I've checked in the console log and it doesn't report it as loading amongst all the other modules. I've looked several times, and yes, the server has been totally restarted (multiple times). Does it need updating or is it my server? What information can I give you to help figure this out?
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on November 08, 2014, 07:35:41 PM
I'm sorry to report that the module for this isn't loading at all. I've checked in the console log and it doesn't report it as loading amongst all the other modules. I've looked several times, and yes, the server has been totally restarted (multiple times). Does it need updating or is it my server? What information can I give you to help figure this out?

Did you put this in addons? Like are you sure you didn't have it like:
gmod/addons/MYADDON/MYADDON/files??

Because I know a lot of people who do that...
Title: Re: Utime Hour Changer Addon :)
Post by: Shalmendo on November 09, 2014, 07:09:49 AM
Did you put this in addons? Like are you sure you didn't have it like:
gmod/addons/MYADDON/MYADDON/files??

Because I know a lot of people who do that...

Oh I think I figured out the problem. Your folder format inside the download is slightly different from others and you have it nested inside of the root folder in directory called lua, which contains the addon.txt and relevant files. So I should put the LUA folder into the addons folder, not the containing folder (ulx set Utime) . Oops. I thought I was better than this! Sorry to waste your time!

Edit:

This is what I get for jumping on the forums without some morning caffeine. I misread the folder structure in your compressed file download. After re-chcking the FTP folder structure, it's correct. The addon.txt, with it's containing lua folder are in a folder like this: garrysmod/addons/ulx set Utime/addon.txt with a subfolder of 'lua'. It's not working like this for some reason, and i'm not sure why. It's not listed in the ULX loading reports, nor do I have any options for it once I open the GUI.

So apparently it's not starting at all.

Further edit:

I went through and compared the folder structures of both the ULX addon itself, and the change utime folders, and yours looks like it's correct. I'm mystified why it's not loading. What are common reasons for ulx addons not even showing up in the loading status?
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on November 12, 2014, 06:25:38 PM
Oh I think I figured out the problem. Your folder format inside the download is slightly different from others and you have it nested inside of the root folder in directory called lua, which contains the addon.txt and relevant files. So I should put the LUA folder into the addons folder, not the containing folder (ulx set Utime) . Oops. I thought I was better than this! Sorry to waste your time!

Edit:

This is what I get for jumping on the forums without some morning caffeine. I misread the folder structure in your compressed file download. After re-chcking the FTP folder structure, it's correct. The addon.txt, with it's containing lua folder are in a folder like this: garrysmod/addons/ulx set Utime/addon.txt with a subfolder of 'lua'. It's not working like this for some reason, and i'm not sure why. It's not listed in the ULX loading reports, nor do I have any options for it once I open the GUI.

So apparently it's not starting at all.

Further edit:

I went through and compared the folder structures of both the ULX addon itself, and the change utime folders, and yours looks like it's correct. I'm mystified why it's not loading. What are common reasons for ulx addons not even showing up in the loading status?



It works for me, the best way to see if it's not working is when you start the server, it tells you all the modules that load for ulx. So, I'd suggest to check yours with mine. See if your folder/files look like mine:

(http://puu.sh/cOyHN/d4d1dfae7c.png)
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on November 12, 2014, 06:49:40 PM
Updated All Plugins:
I updated all files/folder names to lowercase and underscores so that we won't have a problem with linux based server.

Special Thanks to Princess Twilight Sparkle
Title: Re: Utime Hour Changer Addon :)
Post by: Shalmendo on November 13, 2014, 06:56:20 PM
Updated All Plugins:
I updated all files/folder names to lowercase and underscores so that we won't have a problem with linux based server.

Special Thanks to Princess Twilight Sparkle

Oh was that the problem? I've been trying to figure out similiar issues with other addons not loading possibly due to similiar problems in a thread here:
http://forums.ulyssesmod.net/index.php/topic,7755.0.html (http://forums.ulyssesmod.net/index.php/topic,7755.0.html)

I believe it IS on a linux based system, but we're moving to a dedicated system hosted by the owner himself now, so we'll have full access and not have to put up with that stupid wrench control panel that doesn't seem to work properly. Thanks for the effort, I really appreciate the assistance.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on November 13, 2014, 09:13:28 PM
Oh was that the problem? I've been trying to figure out similiar issues with other addons not loading possibly due to similiar problems in a thread here:
http://forums.ulyssesmod.net/index.php/topic,7755.0.html (http://forums.ulyssesmod.net/index.php/topic,7755.0.html)

I believe it IS on a linux based system, but we're moving to a dedicated system hosted by the owner himself now, so we'll have full access and not have to put up with that stupid wrench control panel that doesn't seem to work properly. Thanks for the effort, I really appreciate the assistance.

It was possible that the having a linux based server was the issue with my addon, but it "should" be fixed, according to Princess Brony Person. So, but it's possible that there was maybe another issue with yours, but if it's not loading, I can't really help with that, as it's nothing I can diagnose without it loading and erroring out. But if I recall, GMOD also has it's own loading thing, telling you what loads and what doesn't, though as you said, you don't have access to the main server, it may not be of much help. I suppose all I can say is, good luck mate. If you have any other questions, typically I do not browse these forums anymore, but others are helpful on here, and can provide answers on most problems generally with anything (which includes my plugins).
Title: Re: Utime Hour Changer Addon :)
Post by: Shalmendo on November 14, 2014, 07:27:32 AM
It was possible that the having a linux based server was the issue with my addon, but it "should" be fixed, according to Princess Brony Person. So, but it's possible that there was maybe another issue with yours, but if it's not loading, I can't really help with that, as it's nothing I can diagnose without it loading and erroring out. But if I recall, GMOD also has it's own loading thing, telling you what loads and what doesn't, though as you said, you don't have access to the main server, it may not be of much help. I suppose all I can say is, good luck mate. If you have any other questions, typically I do not browse these forums anymore, but others are helpful on here, and can provide answers on most problems generally with anything (which includes my plugins).

Thank you very much for trying to help me out. It's kind of a moot issue at this point since we're migrating to a personal dedicated server running in the owner's house, instead of a hosted service. I should be able to have full SSH contact with it and more, so this won't be an issue anymore. Thanks for helping!
Title: Re: Utime Hour Changer Addon :)
Post by: JamminR on November 15, 2014, 03:25:51 PM
Bytewave, I've changed the appearance of your name on our forums, at the request of your signature.
I've also deleted your last post.
This thread isn't the place to question such things. I honestly don't think he meant ill-will.
Take it private if you truly wish to question a possible mis-understanding.
Title: Re: Utime Hour Changer Addon :)
Post by: Bytewave on November 15, 2014, 05:39:02 PM
Bytewave, I've changed the appearance of your name on our forums, at the request of your signature.
I've also deleted your last post.
This thread isn't the place to question such things. I honestly don't think he meant ill-will.
Take it private if you truly wish to question a possible mis-understanding.
Right.
My apologies, and thank you. I'll attempt to refrain from such things later on.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on November 17, 2014, 04:37:13 PM
Assuming that what I said was most likely taken offensively. Though looking through what I said, I assume that the phrase, 'Princess Brony Person' had offended you. It was not meant to offend you, I had said it more or less as a light joke. Seeing as your signature said something similiar to it, and when I was writing that post, I wrote it on my phone, and I didn't want to check your exact name as the page could crash (iPhone.. 4g), so I decided to just use the name that I really can you remember for. So if what I said offended you, I apologize for that.
Title: Re: Utime Hour Changer Addon :)
Post by: Bytewave on November 17, 2014, 04:44:40 PM
Assuming that what I said was most likely taken offensively. Though looking through what I said, I assume that the phrase, 'Princess Brony Person' had offended you. It was not meant to offend you, I had said it more or less as a light joke. Seeing as your signature said something similiar to it, and when I was writing that post, I wrote it on my phone, and I didn't want to check your exact name as the page could crash (iPhone.. 4g), so I decided to just use the name that I really can you remember for. So if what I said offended you, I apologize for that.
it's fine... Not sure if it's the best idea to continue taking here, as Jam previously noted...
Title: Re: Utime Hour Changer Addon :)
Post by: Shalmendo on November 18, 2014, 07:55:39 AM
Chaos,

The adjustments you made to your mod now have it working properly on a linux dedicated when it was not before.
We swapped to a dedicated linux server the owner is hosting directly in his home, and the same modules didn't want to work again. HOWEVER, whatever change(s) you made has yours working.

Can you give me a rundown on what you did so that I can try to replicate it with the other modules?

Edit:

I decided to do the non-lazy thing and review your earlier post. You changed the folder/file names to be lowercase without spaces. This has fixed the other modules!
It might be a good idea to put this in a FAQ somewhere since it's a minor and subtle difference that makes a huge impact on what actually works! A lot of windows users will find this very confusing.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on November 18, 2014, 04:04:08 PM
Chaos,

The adjustments you made to your mod now have it working properly on a linux dedicated when it was not before.
We swapped to a dedicated linux server the owner is hosting directly in his home, and the same modules didn't want to work again. HOWEVER, whatever change(s) you made has yours working.

Can you give me a rundown on what you did so that I can try to replicate it with the other modules?

Edit:

I decided to do the non-lazy thing and review your earlier post. You changed the folder/file names to be lowercase without spaces. This has fixed the other modules!
It might be a good idea to put this in a FAQ somewhere since it's a minor and subtle difference that makes a huge impact on what actually works! A lot of windows users will find this very confusing.

To be honest, I didn't even know that linux ("being as complex as it is"), can't handle a simple uppercase... but oh well.
Title: Re: Utime Hour Changer Addon :)
Post by: Bytewave on November 18, 2014, 04:29:31 PM
To be honest, I didn't even know that linux ("being as complex as it is"), can't handle a simple uppercase... but oh well.
I do believe this is Garry/Facepunch's issue, if not Lua or the Source engine. *nix systems ought to handle capital letters in file/directory names fine.
Title: Re: Utime Hour Changer Addon :)
Post by: Shalmendo on November 18, 2014, 06:14:38 PM
I do believe this is Garry/Facepunch's issue, if not Lua or the Source engine. *nix systems ought to handle capital letters in file/directory names fine.

Yeah it doesn't make sense to me either. Nor to the other people I'm working with (one of which who's rather expert in linux.)

It's probably one of those stupid differences between the windows and linux versions of gmod that I've had to deal with. One of our admins plays on linux and quite few addons and such have odd or unusual behaviors on linux, according to his experiences.
Title: Re: Utime Hour Changer Addon :)
Post by: Bytewave on November 18, 2014, 06:32:17 PM
Yeah it doesn't make sense to me either. Nor to the other people I'm working with (one of which who's rather expert in linux.)

It's probably one of those stupid differences between the windows and linux versions of gmod that I've had to deal with. One of our admins plays on linux and quite few addons and such have odd or unusual behaviors on linux, according to his experiences.
All I can say is... blame Garry.
Anyway, enough tan(x)...
/OT
Title: Re: Utime Hour Changer Addon :)
Post by: Shalmendo on November 29, 2014, 09:24:31 AM
Chaos,

I have another question for you.

Is it possible to edit the hours of somone who's not on the server but who's in one of the ULX groups? We're going to edit peoples times so the auto promoter demotes them next time they get on (for punishment reasons).
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on December 01, 2014, 01:30:37 AM
Chaos,

I have another question for you.

Is it possible to edit the hours of somone who's not on the server but who's in one of the ULX groups? We're going to edit peoples times so the auto promoter demotes them next time they get on (for punishment reasons).

Technically speaking yes. There isn't really an easy way to do it though, I suppose I could technically make a console command for it, but it becomes sketchy and more "breakable". I try to make addons that others can't break and then try to blame me for it.

Anyways, if you really want to edit peoples time, all you need to do is (WARNING, BE CAREFUL IF YOU DECIDE TO GO THROUGH WITH THIS PLAN, IM NOT RESPONSIBLE FOR IF YOU BREAK ANYTHING. (ALSO TURN YOUR SERVER OFF BEFORE YOU DO THIS)) is download a sqlite viewer (such as sqlite admin or sqliteman), and open up your sv.db file located at the cored of your server (garrysmod/garrysmod/sv.db). Then you need to find the table called utime, then find the SteamID of the person you want to edit, and change their total time to 0 as well as lastvisit..

After all that, upload the file back, and turn the server back on.
Title: Re: Utime Hour Changer Addon :)
Post by: Bite That Apple on February 03, 2015, 11:40:20 PM
Updated addon to current system!
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Stranger Danger on March 13, 2015, 11:23:41 AM
Hey, great module I use it on my server with apromote, people get ranks depending on how long they have played with us. We also give a 4 hour boost to anyone who joins our forums and post an introduction to get more people on there. So I created a module called addtime which I copied a lot of what you had and modified it to, addtime adds the hours specified on top of what they had. This way I can add say 4 hours and they don't lose the 40 min they had into that hour. I hope this is okay and if your interested I can give it to you.
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Bite That Apple on March 13, 2015, 01:43:58 PM
Hey, great module I use it on my server with apromote, people get ranks depending on how long they have played with us. We also give a 4 hour boost to anyone who joins our forums and post an introduction to get more people on there. So I created a module called addtime which I copied a lot of what you had and modified it to, addtime adds the hours specified on top of what they had. This way I can add say 4 hours and they don't lose the 40 min they had into that hour. I hope this is okay and if your interested I can give it to you.

I'd like to see what you've done, maybe I can make it official with your credits on it.
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Stranger Danger on March 13, 2015, 01:54:24 PM
So a few things, for one I set it so it doesn't round the number so I can add .5 hours for a half an hour. This is for if someone does something extra or we sometimes do trivia for small amounts of time I can add say 15 minutes. If you could add something along the lines of !addtime name 15m for 15m that would be amazing. But feel free to add/modify/delete what ever you want, it basically yours.

Also could there be the potential to add time to a group of people? I am not sure how sql works for utime so wasn't sure if that was possible. But maybe a !addtime * or !addtime user.

Here is the code:
Code: [Select]
---------------------------------add time--------------------------------------
function ulx.addtime( calling_ply, target_ply, time )
 
local affected_plys = {}
function updatePlayer( ply )
sql.Query( "UPDATE utime SET totaltime = " .. math.floor( ply:GetUTimeTotalTime() ) .. " WHERE player = " .. ply:UniqueID() .. ";" )
end
 
function updateAll()
local players = player.GetAll()
 
for _, ply in ipairs( players ) do
if ply and ply:IsConnected() then
updatePlayer( ply )
end
end
end
 
 
local plyID = tostring(target_ply:UniqueID())
local ply = player.GetByUniqueID(plyID)
local ammount = tonumber(tostring(time))
ammount = ammount * 3600
newtime = ply:GetUTimeTotalTime() + ammount
ply:SetUTime( newtime )
ply:SetUTimeStart( CurTime() )
 
  //sql.Query( "UPDATE utime SET totaltime = " ..  math.floor(newtime)  .. " WHERE player = " .. plyID .. ";" )
  updateAll()
table.insert( affected_plys, target_ply )
ulx.fancyLogAdmin( calling_ply, "#A added #s hours to #T", time, affected_plys )
end
 
 
local addtime = ulx.command( CATEGORY_NAME, "ulx addtime", ulx.addtime, "!addtime" )
addtime:addParam{ type=ULib.cmds.PlayerArg }
addtime:addParam{ type=ULib.cmds.NumArg, min=0, default=1, hint="Hours" }
addtime:defaultAccess( ULib.ACCESS_SUPERADMIN )
addtime:help( "Add hours to a players time - !addtime" )
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: PotatoMan on March 26, 2015, 12:50:58 AM
Why doesn't this work for me? Someone please help me. I want this because the Utime somehow stuffed up and reset the time:|
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: allofmywutsteam on March 26, 2015, 05:23:52 PM
Due to some unfortunate circumstances, I had to completely wipe my computer of anything GMod related, and reinstall it, plus validate tf2 and hl2 etc.

Now that I'm up and running, I first download the 10-13 addons I keep up to date from the WS, and then join my main server. Immediately when I join, I am greeted by 2 big concerns:

1. (related to this addon) script errors that spammed my console for nearly a minute. Screenshots of the errors included.
(http://puu.sh/gR2N7/414ed69ccd.png)

(http://puu.sh/gR2Oa/2b3318c41b.png)

Any ideas?

2. (unrelated I think) I get the below XGUI warning which I have never seen in the 3+ years I've played the game
(http://puu.sh/gR2Tr/f93bca30f2.png)

I'll be posting in the ULX thread with the second problem once the first is resolved. Unless someone can chime in here.

Oh, and my utime hours are fine, by the box itself has been re-positioned and colors defaulted.

Keep in mind this has only happened this one time. Maybe it's happened in the beginning and never again after, but if my users are experiencing this the first time they join for the very first time, then I'm a bit concerned.
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: JamminR on March 26, 2015, 09:29:41 PM
Make sure you're getting UTime, ULib and ULX from the Ulysses Github repository site.
It's part of our entire project zip. You don't need all of the foders in that zip, but definitely need the latest UTime.
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Bite That Apple on March 27, 2015, 01:13:12 AM
Why doesn't this work for me? Someone please help me. I want this because the Utime somehow stuffed up and reset the time:|

I would suggest reading this first:
http://forums.ulyssesmod.net/index.php/topic,8327 (http://forums.ulyssesmod.net/index.php/topic,8327)
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: allofmywutsteam on March 27, 2015, 07:58:07 AM
Make sure you're getting UTime, ULib and ULX from the Ulysses Github repository site.
It's part of our entire project zip. You don't need all of the foders in that zip, but definitely need the latest UTime.

Are you talking to me? If so I get ulx/ulib from the Ulysses site or github authored by the team. And Utime I grabbed from this thread straight from the github as well. As I mentioned, I've only seen this once, and since then I haven't seen it at all. So I'm not sure why it wouldn't show up once and never again.. Weird.

Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Bite That Apple on March 27, 2015, 08:44:16 AM
Are you talking to me? If so I get ulx/ulib from the Ulysses site or github authored by the team. And Utime I grabbed from this thread straight from the github as well. As I mentioned, I've only seen this once, and since then I haven't seen it at all. So I'm not sure why it wouldn't show up once and never again.. Weird.

This doesn't have utime packed in it, you need to get utime yourself.
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: allofmywutsteam on March 27, 2015, 09:49:33 AM
This doesn't have utime packed in it, you need to get utime yourself.

Yes I have utime from the original thread. I thought I was in that thread for a second. Should I just go over there then?

EDIT: to be clear, I've downloaded the github version already (last updated 2 years ago) which is how I got the addon in the first place.
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Bite That Apple on March 27, 2015, 08:50:34 PM
Yes I have utime from the original thread. I thought I was in that thread for a second. Should I just go over there then?

EDIT: to be clear, I've downloaded the github version already (last updated 2 years ago) which is how I got the addon in the first place.

I would suggest asking your question on that thread, as you'd get the most attention there, rather than my thread.
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Zaddion on April 02, 2015, 05:08:20 PM
Where can I find utime sql?
Title: Re: Utime Hour Changer Addon :) [2.17v]
Post by: Bite That Apple on April 03, 2015, 02:21:34 AM
Where can I find utime sql?

http://forums.ulyssesmod.net/index.php/topic,5737.0.html (http://forums.ulyssesmod.net/index.php/topic,5737.0.html)
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: ?Rias? on July 27, 2015, 04:41:22 PM
HOW DO I PUT THIS IN MY SERVER
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: JamminR on July 27, 2015, 07:40:05 PM
HOW DO I PUT THIS IN MY SERVER
https://www.google.com/search?q=how+to+install+gmod+addon (https://www.google.com/search?q=how+to+install+gmod+addon)
You place it in your server's addons folder.
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: KVJgaming739 on January 15, 2016, 09:54:13 PM
hi there thanks for this I appreciate ir :p
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: Nike on August 06, 2016, 01:58:01 AM
why cant i access the download  i really want this :(
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: JamminR on August 06, 2016, 02:10:55 PM
why cant i access the download  i really want this :(

You're joking, right?
Read the first post. All the way through.
It tells you TWICE the likely reason.

Here, I'll even summarize quote it for you.
Please Keep Note:
<clip>
You must be registered and logged in the ulx forum to see the download link which is found under the preview image
<clip>
Whole bunch of other cool stuff explaining the addon
<clip>
BIG giant example picture.
<clip>
You must be registered and logged in the ulx forum to see the download link which is found under the preview image
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: Undercover Orange on August 07, 2016, 07:05:38 AM
perhaps he is having trouble actually downloading it JamminR... as in he is clicking it and its not downloading.
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: Bite That Apple on August 12, 2016, 04:02:22 AM
You're joking, right?
Read the first post. All the way through.
It tells you TWICE the likely reason.

Here, I'll even summarize quote it for you.

The picture isn't that giant :*(

Though, sometimes people don't read.
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: sub on August 30, 2016, 02:07:39 PM
thanks m8
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: BaileyS on September 02, 2016, 12:50:18 AM
Im Logged In But There Is No Download Link WTF....
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: Bite That Apple on September 02, 2016, 04:23:50 AM
Im Logged In But There Is No Download Link WTF....

(http://puu.sh/qXhA1/affaf98a84.png)
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: LinuxBender on September 03, 2016, 10:41:03 AM
These are some great addons.

By chance do you have them checked into github, gitlabs or biitbucket?  That is how I watch for changes on most things.


Regards

P.S.  I tried to PM you instead of posting here, but PM's appear to be blocked.  Perhaps because I recently registered.
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: Bite That Apple on September 03, 2016, 04:57:45 PM
These are some great addons.

By chance do you have them checked into github, gitlabs or biitbucket?  That is how I watch for changes on most things.


Regards

P.S.  I tried to PM you instead of posting here, but PM's appear to be blocked.  Perhaps because I recently registered.

I believe I turned my PMs off in 2012. Either way, no I do not have them on github, except for the autochecker update. You'll know if any of my addons are out of date, as it will remind you on the server console, and any superadmins who join the server.

Either way though, I don't really update most of the ulx modules, as they don't break normally.
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: YoItsLynx on March 26, 2017, 11:25:46 AM
THANKS FOR THIS
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: MythGmod on June 30, 2017, 08:01:58 AM
Thanks ;D
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: Melcez on August 18, 2017, 04:14:29 AM
Thanks for sharing this.
I hope it's actually works.   :P
Title: Re: Utime Hour Changer Addon :) [2.18v]
Post by: teste85340 on March 15, 2018, 08:41:08 AM
+1