Guest User

Untitled

a guest
Oct 16th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. public SyncTime()
  2. {
  3. new string[64];
  4. new tmphour;
  5. new tmpminute;
  6. new tmpsecond;
  7. gettime(tmphour, tmpminute, tmpsecond);
  8. FixHour(tmphour);
  9. tmphour = shifthour;
  10. if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
  11. {
  12. WeatherCalling++;
  13. if(WeatherCalling > 3)
  14. {
  15. WeatherCalling = 0;
  16. new rand;
  17. rand = random(20);
  18. switch(rand)
  19. {
  20. case 0:{ SetWeather(11); gWeather = 11; }
  21. case 8:{ SetWeather(12); gWeather = 12; }
  22. case 9:{ SetWeather(5); gWeather = 5; }
  23. case 16:{ SetWeather(4); gWeather = 4; }
  24. case 19:{ SetWeather(20); gWeather = 20; }
  25. default:{ SetWeather(rand); gWeather = rand; }
  26. }
  27. }
  28. format(string, sizeof(string), "The time is now %d:00.",tmphour);
  29. BroadCast(COLOR_WHITE,string);
  30. ghour = tmphour;
  31. TotalUptime += 1;
  32. PayDay();
  33. if (realtime)
  34. {
  35. // SetWorldTime(tmphour);
  36. gTime = tmphour;
  37. }
  38.  
  39. for(new i = 0; i < MAX_TURFS; i++)
  40. {
  41. if(TurfWars[i][twVulnerable] > 0)
  42. {
  43. TurfWars[i][twVulnerable]--;
  44. if(TurfWars[i][twVulnerable] == 0)
  45. {
  46. if(TurfWars[i][twOwnerId] != -1)
  47. {
  48. format(string,sizeof(string),"%s that you currently own is vulnerable for capture!",TurfWars[i][twName]);
  49. SendNewFamilyMessage(i, COLOR_YELLOW, string);
  50. }
  51. }
  52. }
  53. }
  54.  
  55. for(new i = 0; i < MAX_FAMILY; i++)
  56. {
  57. if(FamilyInfo[i][FamilyTurfTokens] < 24)
  58. {
  59. FamilyInfo[i][FamilyTurfTokens]++;
  60. switch(FamilyInfo[i][FamilyTurfTokens])
  61. {
  62. case 12:
  63. {
  64. SendNewFamilyMessage(i, COLOR_WHITE, "Your family/gang now has 1 Turf Token, you may /claim to use it.");
  65. }
  66. case 24:
  67. {
  68. SendNewFamilyMessage(i, COLOR_WHITE, "Your family/gang now has 2 Turf Tokens, you may /claim to use them.");
  69. }
  70. }
  71. }
  72. }
  73. SaveFamilies();
  74. }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment