CMD:tod problem.
#7

Alright... i found this
Код:
new realtime = 1;
/////this
	if(!realtime)
	{
  		wtime = (MPHour + 3) % 24;
		SetWorldTime(wtime);
		gTime = wtime;
	}
/////////////this
	if (realtime)
	{
		new tmphour;
		new tmpminute;
		new tmpsecond;
		gettime(tmphour, tmpminute, tmpsecond);
		FixHour(tmphour);
		tmphour = shifthour;
		SetWorldTime(tmphour);
		gTime = tmphour;
	}
////////////////and this
public SyncTime()
{
	new string[128];
	new tmphour;
	new tmpminute;
	new tmpsecond;
	gettime(tmphour, tmpminute, tmpsecond);
	FixHour(tmphour);
	tmphour = shifthour;
	if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
	{
		WeatherCalling++;
		if(WeatherCalling > 3)
		{
		    WeatherCalling = 0;
		    new rand;
		    rand = random(20);
		    switch(rand)
		    {
          case 0:{ SetWeather(11); gWeather = 11; }
		        case 8:{ SetWeather(12); gWeather = 12; }
		        case 9:{ SetWeather(5); gWeather = 5; }
		        case 16:{ SetWeather(4); gWeather = 4; }
		        case 19:{ SetWeather(20); gWeather = 20; }
		        default:{ SetWeather(rand); gWeather = rand; }
		    }
		}
		format(string, sizeof(string), "Sekarang pukul %d:00.",tmphour);
		BroadCast(COLOR_WHITE,string);
		ghour = tmphour;
		TotalUptime += 1;
		PayDay();
		if (realtime)
		{
			SetWorldTime(tmphour);
			gTime = tmphour;
		}
//////////////
Thats what i found... With "realtime" search keywords
Reply


Messages In This Thread
CMD:tod problem. - by 0B3Y - 26.07.2014, 00:25
Re: CMD:tod problem. - by Blademaster680 - 26.07.2014, 00:33
Re: CMD:tod problem. - by 0B3Y - 26.07.2014, 00:37
Re: CMD:tod problem. - by Blademaster680 - 26.07.2014, 00:44
Re: CMD:tod problem. - by 0B3Y - 26.07.2014, 00:54
Re: CMD:tod problem. - by Blademaster680 - 26.07.2014, 01:06
Re: CMD:tod problem. - by 0B3Y - 26.07.2014, 01:11
Re: CMD:tod problem. - by Blademaster680 - 26.07.2014, 01:14
Re: CMD:tod problem. - by 0B3Y - 26.07.2014, 01:18
Re: CMD:tod problem. - by Blademaster680 - 26.07.2014, 01:28

Forum Jump:


Users browsing this thread: 1 Guest(s)