Advertisement
Guest User

Untitled

a guest
Jun 26th, 2022
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. public DinamicWeather() {
  2. new tmphour,
  3. tmpminute,
  4. tmpsecond;
  5.  
  6. gettimeEx(tmphour, tmpminute, tmpsecond);
  7. FixHour( tmphour );
  8. tmphour = shifthour;
  9.  
  10. #if ZIMSKI_MOD == 1
  11. SetWeather( 14 );
  12. ServerInfo[ Prognozasys ] = 14;
  13. #else
  14. if( tmphour >= 6 && tmphour <= 20 ) {
  15. new RandomWeather;
  16. RandomWeather = random( 10 );
  17. switch( RandomWeather ) {
  18. case 0: {
  19. SetWeather( 1 );
  20. SendClientMessageToAll( 0x33AA33AA, "[VREME] Vreme je suncano i ugodno." );
  21. ServerInfo[ Prognozasys ] = 1;
  22. }
  23. case 1: {
  24. SetWeather( 7 );
  25. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je tmurno i oblacno. ");
  26. ServerInfo[ Prognozasys ] = 7;
  27. }
  28. case 2: {
  29. SetWeather( 8 );
  30. SendClientMessageToAll(0x33AA33AA, "[VREME] Kisa je pocela da pada. Upozoravaju se vozaci da opreznije voze radi skliskih kolnika.");
  31. ServerInfo[ Prognozasys ] = 8;
  32. }
  33. case 3: {
  34. SetWeather( 13 );
  35. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je suncano i odlicno za odlazak na plazu. Temperatura vode je ugodnih 22C.");
  36. ServerInfo[ Prognozasys ] = 13;
  37. }
  38. case 4: {
  39. SetWeather( 15 );
  40. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je oblacno i vjetrovito. Brzina vjetra iznosi 20km/h.");
  41. ServerInfo[ Prognozasys ] = 15;
  42. }
  43. case 5: {
  44. SetWeather( 17 );
  45. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je oblacno i ugodno za setnje prirodom.");
  46. ServerInfo[ Prognozasys ] = 17;
  47. }
  48. case 6: {
  49. SetWeather( 24 );
  50. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je suncano. Preporucuje se da se pije sto vise tekucine radi vrucina.");
  51. ServerInfo[ Prognozasys ] = 24;
  52. }
  53. case 7: {
  54. SetWeather( 10 );
  55. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je svjeze i suncano. Temperatura zraka iznosi 29C");
  56. ServerInfo[ Prognozasys ] = 10;
  57. }
  58. case 8: {
  59. SetWeather( 43 );
  60. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je maglovito i tmurno.");
  61. SendClientMessageToAll(0x33AA33AA, "[VREME] Upozoravaju se vozaci da opreznije voze radi slabije vidljivosti na cestama.");
  62. ServerInfo[ Prognozasys ] = 43;
  63. }
  64. case 9: {
  65. SetWeather( 40 );
  66. SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je ugodno i suncano.");
  67. ServerInfo[ Prognozasys ] = 40;
  68. }
  69. }
  70. }
  71. else if( tmphour >= 21 && tmphour <= 5 ) {
  72. SetWeather( 10 );
  73. ServerInfo[ Prognozasys ] = 10;
  74. }
  75. #endif
  76. return 1;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement