General > Developers Corner

I Hit a wall, but still need to move...

(1/1)

Woody666:
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: ---schedule.Add
--- End code ---
along with

--- Code: ---game.ConsoleCommand
--- End code ---
If 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.

Megiddo:
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.

Woody666:
Ok, thank you... now I get to spend all day figuring that out. Should have never stoped coding

JamminR:
os.date will be very helpful too.

Navigation

[0] Message Index

Go to full version