Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public DinamicWeather() {
- new tmphour,
- tmpminute,
- tmpsecond;
- gettimeEx(tmphour, tmpminute, tmpsecond);
- FixHour( tmphour );
- tmphour = shifthour;
- #if ZIMSKI_MOD == 1
- SetWeather( 14 );
- ServerInfo[ Prognozasys ] = 14;
- #else
- if( tmphour >= 6 && tmphour <= 20 ) {
- new RandomWeather;
- RandomWeather = random( 10 );
- switch( RandomWeather ) {
- case 0: {
- SetWeather( 1 );
- SendClientMessageToAll( 0x33AA33AA, "[VREME] Vreme je suncano i ugodno." );
- ServerInfo[ Prognozasys ] = 1;
- }
- case 1: {
- SetWeather( 7 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je tmurno i oblacno. ");
- ServerInfo[ Prognozasys ] = 7;
- }
- case 2: {
- SetWeather( 8 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Kisa je pocela da pada. Upozoravaju se vozaci da opreznije voze radi skliskih kolnika.");
- ServerInfo[ Prognozasys ] = 8;
- }
- case 3: {
- SetWeather( 13 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je suncano i odlicno za odlazak na plazu. Temperatura vode je ugodnih 22C.");
- ServerInfo[ Prognozasys ] = 13;
- }
- case 4: {
- SetWeather( 15 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je oblacno i vjetrovito. Brzina vjetra iznosi 20km/h.");
- ServerInfo[ Prognozasys ] = 15;
- }
- case 5: {
- SetWeather( 17 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je oblacno i ugodno za setnje prirodom.");
- ServerInfo[ Prognozasys ] = 17;
- }
- case 6: {
- SetWeather( 24 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je suncano. Preporucuje se da se pije sto vise tekucine radi vrucina.");
- ServerInfo[ Prognozasys ] = 24;
- }
- case 7: {
- SetWeather( 10 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je svjeze i suncano. Temperatura zraka iznosi 29C");
- ServerInfo[ Prognozasys ] = 10;
- }
- case 8: {
- SetWeather( 43 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je maglovito i tmurno.");
- SendClientMessageToAll(0x33AA33AA, "[VREME] Upozoravaju se vozaci da opreznije voze radi slabije vidljivosti na cestama.");
- ServerInfo[ Prognozasys ] = 43;
- }
- case 9: {
- SetWeather( 40 );
- SendClientMessageToAll(0x33AA33AA, "[VREME] Vreme je ugodno i suncano.");
- ServerInfo[ Prognozasys ] = 40;
- }
- }
- }
- else if( tmphour >= 21 && tmphour <= 5 ) {
- SetWeather( 10 );
- ServerInfo[ Prognozasys ] = 10;
- }
- #endif
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement