22.03.2018, 19:19
I'll assume you have time changes scripted somehow, because the other way it's weird.
In my script e.g. I have a timer for each second, just as Logic_ wouldn't advice as of before:
In this case, I just check for what time is it every time this function called upon a timer is done. Naturally, in this case I might want to make the timer looped.
Your personal approach only depends on you though. What I wrote above might not be the best way in means of performance, just like Logic_ stated.
In my script e.g. I have a timer for each second, just as Logic_ wouldn't advice as of before:
Код:
1. (Do not try approach) Run a timer every few seconds and get the time and compare it to 6 and then give them some money.
Код:
new Hour, Minute, Second; gettime(Hour, Minute, Second); ... if(Hour == 6 && Minute == 0 && Second == 0) //The other way around, well... You'll get the action done every second of an hour, which means 3599 actions you didn't want to happen. { //Do actions required } ...