A paycheck system
#1

I've been working on a roleplay script lately, I'm just curious as to how I could use gettime(&hour=0, &minute=0, &second) to initiate a paycheck every time it hits an hour.
Any links etc, would be greatly appreciated.
Reply
#2

Well ongamemodeinit set a timer for everysecond, and make a new saved player variable called seconds connected.

Once the saved variables, secondsconnected reaches 3600(Thats one hour in seconds), it gives a paycheck
Reply
#3

Quote:
Originally Posted by Nuke547
Посмотреть сообщение
Well ongamemodeinit set a timer for everysecond, and make a new saved player variable called seconds connected.

Once the saved variables, secondsconnected reaches 3600(Thats one hour in seconds), it gives a paycheck
Nothing like what I meant, I don't want to start a timer that initiates a paycheck in an hour from the server initialization.
I want it to give a paycheck each hour IRL / server time.
Reply
#4

Quote:
Originally Posted by Jack_Wilson
Посмотреть сообщение
Nothing like what I meant, I don't want to start a timer that initiates a paycheck in an hour from the server initialization.
I want it to give a paycheck each hour IRL / server time.
I've haven't started to learn how to make a payday system, but I recommend reading the wiki's. Specifically GetTime and GetDate. I honestly don't know how payday systems work, but it's a start. You can also try looking at a GF edit and using that script as a reference to scripting. I use them whenever I get stuck on something. Goodluck.
Reply
#5

So for every hour that goes by irl, it gives them a paycheck?
Reply
#6

Quote:
Originally Posted by Nuke547
Посмотреть сообщение
So for every hour that goes by irl, it gives them a paycheck?
Correct.
gettime() seems to only give me a unix timestamp, I can't determine the actual hour at all.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)