Payday f&*ked
#1

I have a problem with my payday system. Some players receive payday, other no. I found that players who receive payday have even IDs (example: 0, 2, 4, 6).

Код:
synctimer = SetTimer("SyncUp", 60000, 1);
Код:
public SyncUp()
{
	SyncTime();
	DollahScoreUpdate();
}
public SyncTime()
{
	new string[64];
	new tmphour;
	new tmpminute;
	new tmpsecond;
	gettime(tmphour, tmpminute, tmpsecond);
	FixHour(tmphour);
	tmphour = shifthour;
	if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
	{
		format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour);
		BroadCast(COLOR_WHITE,string);
		ghour = tmphour;
		PayDay();
		if (realtime)
		{
			SetWorldTime(tmphour);
		}
	}
}
Код:
public FixHour(hour)
{
	hour = timeshift+hour;
	if (hour < 0)
	{
		hour = hour+24;
	}
	else if (hour > 23)
	{
		hour = hour-24;
	}
	shifthour = hour;
	return 1;
}
Reply
#2

Could you please post the code for your PayDay() function? There are no obvious errors elsewhere and I would assume that the problem lies within that code.
Reply
#3

What Simeon87 says.

Did you accidentally placed something like " var = var *2; somewhere in your PayDay() function?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)