rickvocam

Untitled

Apr 8th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.05 KB | None | 0 0
  1.  
  2. new SWeather = 0;
  3.  
  4. #define WEATHER_UNKNOWN             0
  5. #define WEATHER_SUNNY               1
  6. #define WEATHER_MOSTLY_SUNNY        2
  7. #define WEATHER_PARTLY_CLOUDY       3
  8. #define WEATHER_MOSTLY_CLOUDY       4
  9. #define WEATHER_CLOUDY              5
  10. #define WEATHER_LIGHT_RAIN          6
  11. #define WEATHER_SHOWERS             7
  12. #define WEATHER_RAIN                8
  13. #define WEATHER_LIGHT_THUNDERSTORM  9
  14. #define WEATHER_THUNDERSTORM        10
  15. #define WEATHER_MIST                11
  16. #define WEATHER_SNOWRAIN            12
  17. #define WEATHER_LIGHT_SNOW          13
  18.  
  19. task SvrWeather[600000]()
  20. {
  21.     HTTP(0,HTTP_GET,"sa-mp.vn/test.php","","GetRealWeather");
  22.     return 1;
  23. }
  24. forward GetRealWeather(index,response_code, data[]);
  25. public GetRealWeather(index,response_code, data[])
  26. {
  27.     if(response_code == 200)
  28.     {
  29.         if(!strcmp(data, "Sunny")) SWeather = WEATHER_SUNNY;
  30.         else if(!strcmp(data, "Fair") || !strcmp(data, "Mostly Sunny")) SWeather = WEATHER_MOSTLY_SUNNY;
  31.         else if(!strcmp(data, "Partly Cloudy")) SWeather = WEATHER_PARTLY_CLOUDY;
  32.         else if(!strcmp(data, "Mostly Cloudy")) SWeather = WEATHER_MOSTLY_CLOUDY;
  33.         else if(!strcmp(data, "Cloudy")) SWeather = WEATHER_CLOUDY;
  34.         else if(!strcmp(data, "Light Rain")) SWeather = WEATHER_LIGHT_RAIN;
  35.         else if(!strcmp(data, "Showers") || !strcmp(data, "Scattered Showers")) SWeather = WEATHER_SHOWERS;
  36.         else if(!strcmp(data, "Rain")) SWeather = WEATHER_RAIN;
  37.         else if(!strcmp(data, "Mist") || !strcmp(data, "Fog") || !strcmp(data, "Haze")) SWeather = WEATHER_MIST;
  38.         else if(!strcmp(data, "Rain/Snow") || !strcmp(data, "Rain/Snow Showers")) SWeather = WEATHER_SNOWRAIN;
  39.         else if(!strcmp(data, "Light Snow")) SWeather = WEATHER_LIGHT_SNOW;
  40.         else if(!strcmp(data, "T-Rain") || !strcmp(data, "Scattered T-Storm")) SWeather = WEATHER_LIGHT_THUNDERSTORM;
  41.         else if(!strcmp(data, "T-Storm") || !strcmp(data, "Isolated T-Storm")) SWeather = WEATHER_THUNDERSTORM;
  42.         printf(" Get weather success Weather ID :  %d - %s", SWeather, data);
  43.     }
  44.    
  45. }
Advertisement
Add Comment
Please, Sign In to add comment