10.06.2012, 10:22
Hey, I need a script that, from 12h to 22h turn on a function after an hour turn off. It should be fuction only one a day.
Sorry for bad English
Sorry for bad English
forward HourCheck();
public HourCheck() {
new h, m, s;
static lH;
gettime(h, m, s);
if( h < 12 || h > 22 ) {
return 0;
}
StartFunction();
if(h == (lH + 1)) {
StopFunction();
}
lH = h;
return 1;
}
stock StopFunction() {
}
stock StartFunction() {
}
SetTimer("HourCheck", 1800000, 1);
#define RandMinMax(%0,%1) \
random((%1-%0))+%0
SetTimer("HourCheck", RandMinMax(43200000, 86400000), 1);