Problem with time..
#3

Код:
//==========================[Clock]=======================================
new hour, minute;
new timestr[32];

//=========================[World Time]=========================================
new timeshift = -1;
new shifthour;
new ghour = 0;
new gminute = 0;
new gsecond = 0;
new realtime = 1;
new wtime = 15;

//==============================================================================
public UpdateTime()
{
    gettime(hour, minute);
   	format(timestr,32,"%02d:%02d",hour,minute);

   	SetWorldTime(hour);

	new x=0;
	while(x!=MAX_PLAYERS) {
	    if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
	        SetPlayerTime(x,hour,minute);
		 }
		 x++;
	}
}

    UpdateTime();
	SetTimer("UpdateTime",1000 * 60,1);

	gettime(ghour, gminute, gsecond);
	FixHour(ghour);
	ghour = shifthour;
	if(!realtime)
	{
		SetWorldTime(wtime);
	}
	AllowInteriorWeapons(1);
	EnableStuntBonusForAll(0);
	SetNameTagDrawDistance(60.0);
	CalculateStarted = 1;
    CalculateEvent = 1;
    Jackpot = 50000;
    EventPlayers = 0;
	if (realtime)
	{
		new tmphour;
		new tmpminute;
		new tmpsecond;
		gettime(tmphour, tmpminute, tmpsecond);
		FixHour(tmphour);
		tmphour = shifthour;
		SetWorldTime(tmphour);
	}

	gettime(hour, minute);
	SetPlayerTime(playerid,hour,minute);
I think this ghour, timeshift and etc. dont need me..
Reply


Messages In This Thread
Problem with time.. - by dundolina - 07.12.2014, 15:45
Re: Problem with time.. - by UltraScripter - 07.12.2014, 15:51
Re: Problem with time.. - by dundolina - 08.12.2014, 09:46
Re: Problem with time.. - by dundolina - 08.12.2014, 20:18
Re: Problem with time.. - by Kaperstone - 08.12.2014, 21:51
Re: Problem with time.. - by dundolina - 08.12.2014, 23:08
Re: Problem with time.. - by dundolina - 09.12.2014, 21:23
Re: Problem with time.. - by dundolina - 10.12.2014, 23:02
Re: Problem with time.. - by dundolina - 11.12.2014, 20:46
Re: Problem with time.. - by dundolina - 11.12.2014, 22:54

Forum Jump:


Users browsing this thread: 4 Guest(s)