25.06.2010, 02:39
Here's something:
OnGameModeInit:
This is pretty much saying... If it's :00, then it gives paycheck. With a timer for 60 minutes, it will activate the paycheck time.
Код:
new paydaytimer; forward PayUp(); forward PayTime();
Код:
paydaytimer = SetTimer("PayUp", 60000, 1);
Код:
public PayUp() { PayTime(); }
Код:
public PayTime() { new string[64]; new tmphour; new tmpminute; new tmpsecond; gettime(tmphour, tmpminute, tmpsecond); FixHour(tmphour); tmphour = shifthour; if ((tmphour > ghour) || (tmphour == 0 && ghour == 12)) { format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour); BroadCast(COLOR_WHITE,string); ghour = tmphour; PayDay(); if (realtime) { SetWorldTime(tmphour); } } }