Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public SyncTime()
- {
- new string[64];
- 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), "The time is now %d:00.",tmphour);
- BroadCast(COLOR_WHITE,string);
- ghour = tmphour;
- TotalUptime += 1;
- PayDay();
- if (realtime)
- {
- // SetWorldTime(tmphour);
- gTime = tmphour;
- }
- for(new i = 0; i < MAX_TURFS; i++)
- {
- if(TurfWars[i][twVulnerable] > 0)
- {
- TurfWars[i][twVulnerable]--;
- if(TurfWars[i][twVulnerable] == 0)
- {
- if(TurfWars[i][twOwnerId] != -1)
- {
- format(string,sizeof(string),"%s that you currently own is vulnerable for capture!",TurfWars[i][twName]);
- SendNewFamilyMessage(i, COLOR_YELLOW, string);
- }
- }
- }
- }
- for(new i = 0; i < MAX_FAMILY; i++)
- {
- if(FamilyInfo[i][FamilyTurfTokens] < 24)
- {
- FamilyInfo[i][FamilyTurfTokens]++;
- switch(FamilyInfo[i][FamilyTurfTokens])
- {
- case 12:
- {
- SendNewFamilyMessage(i, COLOR_WHITE, "Your family/gang now has 1 Turf Token, you may /claim to use it.");
- }
- case 24:
- {
- SendNewFamilyMessage(i, COLOR_WHITE, "Your family/gang now has 2 Turf Tokens, you may /claim to use them.");
- }
- }
- }
- }
- SaveFamilies();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment