Payday problem.
#10

Here's something:

Код:
new paydaytimer;
forward PayUp();
forward PayTime();
OnGameModeInit:
Код:
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);
		}
	}
}
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.
Reply


Messages In This Thread
Payday problem. - by oliverrud - 24.06.2010, 20:11
Re: Payday problem. - by [HiC]TheKiller - 24.06.2010, 20:15
Re: Payday problem. - by oliverrud - 24.06.2010, 20:17
Re: Payday problem. - by Hiddos - 24.06.2010, 20:23
Re: Payday problem. - by oliverrud - 24.06.2010, 20:25
Re: Payday problem. - by Antonio [G-RP] - 24.06.2010, 20:29
Re: Payday problem. - by oliverrud - 24.06.2010, 20:30
Re: Payday problem. - by lavamike - 24.06.2010, 20:37
Re: Payday problem. - by oliverrud - 24.06.2010, 20:38
Re: Payday problem. - by Despare - 25.06.2010, 02:39

Forum Jump:


Users browsing this thread: 1 Guest(s)