Ulysses

General => Developers Corner => Topic started by: Woody666 on December 05, 2008, 10:55:41 PM

Title: I Hit a wall, but still need to move...
Post by: Woody666 on December 05, 2008, 10:55:41 PM
Ok, well it has  been about a year and a half since i have coded in lua, none the less gmod lua but anyways more to the point: I want to make it so that every Wednesday of every week for 1 hour (5:30 to 6:30 EST) all players who's current usergroup is Player gets put into the Donator group. Once that hour has expired, then they are forced back into the player group. The most (that i think) i know as of right now is to use
Code: [Select]
schedule.Addalong with
Code: [Select]
game.ConsoleCommandIf anyone would be able to help me, it would be much appreciated. I will be back in a few hours; I am working the graveyard shift at work today.
Title: Re: I Hit a wall, but still need to move...
Post by: Megiddo on December 06, 2008, 05:33:25 AM
If I recall correctly, the schedule library is inherently flawed and you shouldn't use it, ever. So, you should make a timer that checks if it's the time you want every so often. Other than that you're on the right track.
Title: Re: I Hit a wall, but still need to move...
Post by: Woody666 on December 06, 2008, 08:10:16 AM
Ok, thank you... now I get to spend all day figuring that out. Should have never stoped coding
Title: Re: I Hit a wall, but still need to move...
Post by: JamminR on December 06, 2008, 09:24:35 AM
os.date will be very helpful too.