Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Sistema de mudança climatica com anuncio do reporter
- Créditos: BrinqueDo
- */
- #include <a_samp>
- #include <zcmd>
- #define CORCLIMA 0xFFFFAFAA
- #define CLIMA1 "[Previsão do Tempo] Dia Limpo, Mínima de {0342F8}22°C{FFFFAF}, Máxima de {F80303}26°C{FFFFAF}."
- #define CLIMA2 "[Previsão do Tempo] Clima Seco, Mínima de {0342F8}24°C{FFFFAF}, Máxima de {F80303}28°C{FFFFAF}."
- #define CLIMA3 "[Previsão do Tempo] Ventos Fortes, Mínima de {0342F8}19°C{FFFFAF}, Máxima de {F80303}22°C{FFFFAF}."
- #define CLIMA4 "[Previsão do Tempo] Tempo Nublado com Ventos fortes, Mínima de {0342F8}15°C{FFFFAF}, Máxima de {F80303}18°C{FFFFAF}."
- #define CLIMA5 "[Previsão do Tempo] Tempo Chuvoso com Ventos fortes, Mínima de {0342F8}12°C{FFFFAF}, Máxima de {F80303}15°C{FFFFAF}."
- #define CLIMA6 "[Previsão do Tempo] Neblina forte, Mínima de {0342F8}2°C{FFFFAF}, Máxima de {F80303}5°C{FFFFAF}."
- #define CLIMA7 "[Previsão do Tempo] Céu Limpo, Mínima de {0342F8}22°C{FFFFAF}, Máxima de {F80303}26°C{FFFFAF}."
- #define CLIMA8 "[Previsão do Tempo] Nublado com Ventos fracos, Mínima de {0342F8}15°C{FFFFAF}, Máxima de {F80303}18°C{FFFFAF}."
- #define CLIMA9 "[Previsão do Tempo] Céu amarelado, Mínima de {0342F8}19°C{FFFFAF}, Máxima de {F80303}21°C{FFFFAF}."
- #define CLIMA10 "[Previsão do Tempo] Tempo Nublado, Mínima de {0342F8}12°C{FFFFAF}, Máxima de {F80303}15°C{FFFFAF}."
- #define CLIMA11 "[Previsão do Tempo] Chuva Forte, Cuidado com a pista escorregadia, Mínima de {0342F8}4°C{FFFFAF}, Máxima de {F80303}7°C{FFFFAF}."
- #define CLIMA12 "[Previsão do Tempo] Céu Alaranjado, Mínima de {0342F8}11°C{FFFFAF}, Máxima de {F80303}14°C{FFFFAF}."
- #define CLIMA13 "[Previsão do Tempo] Neblina Densa com Vento forte, Mínima de {0342F8}-2°C{FFFFAF}, Máxima de {F80303}1°C{FFFFAF}."
- new TimerPrevisao;
- main(){}
- public OnGameModeInit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- forward Previsao();
- public Previsao()
- {
- new clima = random(12);
- if(clima == 0) { SetWeather(0);SendClientMessageToAll (CORCLIMA, CLIMA1);}
- if(clima == 1) { SetWeather(1);SendClientMessageToAll (CORCLIMA, CLIMA2);}
- if(clima == 2) { SetWeather(3);SendClientMessageToAll (CORCLIMA, CLIMA3);}
- if(clima == 3) { SetWeather(7);SendClientMessageToAll (CORCLIMA, CLIMA4);}
- if(clima == 4) { SetWeather(8);SendClientMessageToAll (CORCLIMA, CLIMA5);}
- if(clima == 5) { SetWeather(9);SendClientMessageToAll (CORCLIMA, CLIMA6);}
- if(clima == 6) { SetWeather(11);SendClientMessageToAll (CORCLIMA, CLIMA7);}
- if(clima == 7) { SetWeather(12);SendClientMessageToAll (CORCLIMA, CLIMA8);}
- if(clima == 8) { SetWeather(13);SendClientMessageToAll (CORCLIMA, CLIMA9);}
- if(clima == 9) { SetWeather(15);SendClientMessageToAll (CORCLIMA, CLIMA10);}
- if(clima == 10) { SetWeather(16);SendClientMessageToAll (CORCLIMA, CLIMA11);}
- if(clima == 11) { SetWeather(17);SendClientMessageToAll (CORCLIMA, CLIMA12);}
- if(clima == 12) { SetWeather(19);SendClientMessageToAll (CORCLIMA, CLIMA13);}
- }
- CMD:ativarprevisao(playerid)
- {
- SendClientMessage(playerid, -1, "Você ativou a mudança climatica.");
- TimerPrevisao = SetTimer("Previsao", 10000, true);
- return 1;
- }
- CMD:desativarprevisao(playerid)
- {
- SendClientMessage(playerid, -1, "Você desativou a mudança climatica.");
- KillTimer(TimerPrevisao);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement