Payday every 1 hour
#1

How do make it, every 1 hour will come payday.
Reply
#2

set a timer to run an hour and have it call a function that pays the player(s)
Reply
#3

Minute timer, when minutes are 00 it's payday. If you want to make payday per player paytime then you need to make minute timer again, increase player variable every mintue and when it's 60 it's payday.
Reply
#4

Then:

Код:
synctimer = SetTimer("SyncTime", 3600000, 1);
Код:
public SyncTime()
{
	new string[64];
	new tmphour;
	new tmpminute;
	new tmpsecond;
	gettime(tmphour, tmpminute, tmpsecond);
	FixHour(tmphour);
	//tmphour = shifthour;
	//tmphour++;
	format(string, sizeof(string), "Kell: Tere, kell on saanud %d:00",tmphour);
	BroadCast(COLOR_WHITE,string);
	ghour = tmphour;
	PayDay();
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		PlayerInfo[i][pConnectTime] += 1;
	}
	format(string, sizeof(string), "Eesti Loto Uudised: Eesti Loto loosimine algas - head loosiхnne.");
	OOCOff(COLOR_WHITE, string);
	new rand = random(80);
	if(rand < 77) { rand += 3; }
	Lotto(rand);
}
It's correct?

How do make :00?

But i want make, it takes for In Real Life time. When IRL 22:00 then comes payday.

LARP got that payday system, but these time is bugged.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)