ULX

Author Topic: I Hit a wall, but still need to move...  (Read 2609 times)

0 Members and 1 Guest are viewing this topic.

Offline Woody666

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
I Hit a wall, but still need to move...
« 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.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: I Hit a wall, but still need to move...
« Reply #1 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.
Experiencing God's grace one day at a time.

Offline Woody666

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: I Hit a wall, but still need to move...
« Reply #2 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

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: I Hit a wall, but still need to move...
« Reply #3 on: December 06, 2008, 09:24:35 AM »
os.date will be very helpful too.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming