26.07.2014, 01:11
Alright... i found this
Thats what i found... With "realtime" search keywords
Код:
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; } //////////////