How To Script..
#4

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:
Код:
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.
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.
Код:
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
}
...
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.
Reply


Messages In This Thread
How To Script.. - by Vizi10 - 22.03.2018, 18:22
Re: How To Script.. - by PowerMwK - 22.03.2018, 18:56
Re: How To Script.. - by Logic_ - 22.03.2018, 19:00
Re: How To Script.. - by Maxandmov - 22.03.2018, 19:19
Re: How To Script.. - by Logic_ - 22.03.2018, 19:46
Re: How To Script.. - by Vizi10 - 22.03.2018, 20:07

Forum Jump:


Users browsing this thread: 4 Guest(s)