Advertisement
Guest User

Sistema de Climas

a guest
Aug 9th, 2014
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. #include <a_samp>
  2. #define CLIMATEMPO 0xFFFFAFAA
  3. #define TXT_CLIMA1 "[Tito-Climas] Dia Limpo, Mínima de {0342F8}22°C{FFFFAF}, Máxima de {F80303}26°C{FFFFAF}."
  4. #define TXT_CLIMA2 "[Tito-Climas] Clima Seco, Mínima de {0342F8}24°C{FFFFAF}, Máxima de {F80303}28°C{FFFFAF}."
  5. #define TXT_CLIMA3 "[Tito-Climas] Ventos Fortes, Mínima de {0342F8}19°C{FFFFAF}, Máxima de {F80303}22°C{FFFFAF}."
  6. #define TXT_CLIMA4 "[Tito-Climas] Tempo Nublado com Ventos fortes, Mínima de {0342F8}15°C{FFFFAF}, Máxima de {F80303}18°C{FFFFAF}."
  7. #define TXT_CLIMA5 "[Tito-Climas] Tempo Chuvoso com Ventos fortes, Mínima de {0342F8}12°C{FFFFAF}, Máxima de {F80303}15°C{FFFFAF}."
  8. #define TXT_CLIMA6 "[Tito-Climas] Neblina forte, Mínima de {0342F8}2°C{FFFFAF}, Máxima de {F80303}5°C{FFFFAF}."
  9. #define TXT_CLIMA7 "[Tito-Climas] Céu Limpo, Mínima de {0342F8}22°C{FFFFAF}, Máxima de {F80303}26°C{FFFFAF}."
  10. #define TXT_CLIMA8 "[Tito-Climas] Nublado com Ventos fracos, Mínima de {0342F8}15°C{FFFFAF}, Máxima de {F80303}18°C{FFFFAF}."
  11. #define TXT_CLIMA9 "[Tito-Climas] Céu amarelado, Mínima de {0342F8}19°C{FFFFAF}, Máxima de {F80303}21°C{FFFFAF}."
  12. #define TXT_CLIMA10 "[Tito-Climas] Tempo Nublado, Mínima de {0342F8}12°C{FFFFAF}, Máxima de {F80303}15°C{FFFFAF}."
  13. #define TXT_CLIMA11 "[Tito-Climas] Chuva Forte, Cuidado com a pista escorregadia, Mínima de {0342F8}4°C{FFFFAF}, Máxima de {F80303}7°C{FFFFAF}."
  14. #define TXT_CLIMA12 "[Tito-Climas] Céu Alaranjado, Mínima de {0342F8}11°C{FFFFAF}, Máxima de {F80303}14°C{FFFFAF}."
  15. #define TXT_CLIMA13 "[Tito-Climas] Neblina Densa com Vento forte, Mínima de {0342F8}-2°C{FFFFAF}, Máxima de {F80303}1°C{FFFFAF}."
  16. #define TXT_ALTERADO "[Tito-Climas] Alterado Com Sucesso!"
  17. #define TXT_LOGOU "[Tito-Climas]{0342F8} Esse Server Contem Uma FS de Previsao do Clima Feita Por MauTito"
  18. forward Climas();
  19. forward Mensage();
  20. public OnFilterScriptInit()
  21. {
  22. SetTimer("Climas",1000000, 1);
  23. return 1;
  24. }
  25. public OnFilterScriptExit()
  26. {
  27. return 1;
  28. }
  29. main()
  30. {
  31. print("\n [[[ Previsao do Clima ]]] \n");
  32. }
  33. public OnPlayerConnect(playerid)
  34. {
  35. SendClientMessage(playerid, -1, TXT_LOGOU);
  36. return 1;
  37. }
  38.  
  39. public Climas()
  40. {
  41. new pc = random(12);
  42. if(pc == 0) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA1); SetTimer("Mensage", 100000, false); print(TXT_CLIMA1);}
  43. if(pc == 1) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA2); SetTimer("Mensage", 100000, false); print(TXT_CLIMA2);}
  44. if(pc == 2) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA3); SetTimer("Mensage", 100000, false); print(TXT_CLIMA3);}
  45. if(pc == 3) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA4); SetTimer("Mensage", 100000, false); print(TXT_CLIMA4);}
  46. if(pc == 4) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA5); SetTimer("Mensage", 100000, false); print(TXT_CLIMA5);}
  47. if(pc == 5) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA6); SetTimer("Mensage", 100000, false); print(TXT_CLIMA6);}
  48. if(pc == 6) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA7); SetTimer("Mensage", 100000, false); print(TXT_CLIMA7);}
  49. if(pc == 7) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA8); SetTimer("Mensage", 100000, false); print(TXT_CLIMA8);}
  50. if(pc == 8) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA9); SetTimer("Mensage", 100000, false); print(TXT_CLIMA9);}
  51. if(pc == 9) { SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA10); SetTimer("Mensage", 100000, false);print(TXT_CLIMA10);}
  52. if(pc == 10){ SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA11); SetTimer("Mensage", 100000, false);print(TXT_CLIMA11);}
  53. if(pc == 11){ SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA12); SetTimer("Mensage", 100000, false);print(TXT_CLIMA12);}
  54. if(pc == 12){ SendClientMessageToAll(CLIMATEMPO, TXT_CLIMA13); SetTimer("Mensage", 100000, false);print(TXT_CLIMA13);}
  55. }
  56. public Mensage()
  57. {
  58. new pc = random(12);
  59. if(pc == 0) { SetWeather(0);print(TXT_ALTERADO);}
  60. if(pc == 1) { SetWeather(1);print(TXT_ALTERADO);}
  61. if(pc == 2) { SetWeather(3);print(TXT_ALTERADO);}
  62. if(pc == 3) { SetWeather(7);print(TXT_ALTERADO);}
  63. if(pc == 4) { SetWeather(8);print(TXT_ALTERADO);}
  64. if(pc == 5) { SetWeather(9);print(TXT_ALTERADO);}
  65. if(pc == 6) { SetWeather(11);print(TXT_ALTERADO);}
  66. if(pc == 7) { SetWeather(12);print(TXT_ALTERADO);}
  67. if(pc == 8) { SetWeather(13);print(TXT_ALTERADO);}
  68. if(pc == 9) { SetWeather(15);print(TXT_ALTERADO);}
  69. if(pc == 10) { SetWeather(16);print(TXT_ALTERADO);}
  70. if(pc == 11) { SetWeather(17);print(TXT_ALTERADO);}
  71. if(pc == 12) { SetWeather(19);print(TXT_ALTERADO);}
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement