real time watch help
#1

i made watch that goes exactly like a real watch but whenever server restarts it is on 00:00:00 because it starts from zero...can I some how make that it ongamemodeinit it refreshes itself with timezone i want so i don't have to set it using a command every time server restarts...

Код:
forward TimeUpdate(playerid);
public TimeUpdate(playerid)
{
   	sekunda++;
	if(sekunda == 60)
	{
		minuta++;
		sekunda = 0;
	}
    if(minuta == 60)
	{
		sat++;
		minuta = 0;
	}
	if(sat == 24)
	{
	    sekunda = 0;
	    minuta = 0;
	    sat = 0;
	}

 	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			SetPlayerTime(i, sat, minuta);
		}
	}
}
^^it is working with timer 1000 (1 second)
Reply


Messages In This Thread
real time watch help - by iStrow - 01.04.2012, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)