Advertisement
Guest User

Advanced Weather System - Version 2.1 SAMP

a guest
Apr 25th, 2015
1,189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.18 KB | None | 0 0
  1. /*
  2.         *
  3.         *
  4.         *     (c) Copyright 2009 - 2015, Ciandlah
  5.         *  Do not re-release without authors permission
  6.         *
  7.         *
  8. */
  9.  
  10. #include <a_samp>
  11.  
  12. #if defined FILTERSCRIPT
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.     print("*** Weather System 0.0.1 ***"); /* This printf is allowing the console to see if the FS has loaded */
  17.     print("***  Attempting to Load ***");
  18.    
  19.     SetTimer("WT", 60000, true);    /* This timer allows the plugin to repeatly crossover every hour to change in-game weather */
  20.      
  21.     return 1;
  22. }
  23.  
  24. public OnFilterScriptExit()
  25. {
  26.     KillTimer(WT);
  27.     return 1;
  28. }
  29.  
  30. #else
  31.  
  32. forward WT();
  33. public WT()
  34. {
  35.     new rand = random(10); /* This random value allows the possibilty of 15 weather changing IDS from 1 - 15 */
  36.    
  37.     new string[256];    /* This string is the text in the message that displays to all the players */
  38.     switch(rand)  /* This random swtich generates the next weather that the server will have */
  39.     {
  40.         case 0:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - MODERATE WIND - CHANCE OF SHOWERS");
  41.         case 1:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - LIGHT WIND - FOGGY START TO THE MORNING");
  42.         case 2:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - NO WIND - NO OTHER ALERTS");
  43.         case 3:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - EXTREME WINDS - FINE SPELLS");
  44.         case 4:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - HEAVY WINDS - NO OTHER ALERTS");
  45.         case 5:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - NO WIND - CHANCE OF LATE NIGHT FOG");
  46.         case 7:format(string, sizeof(string), "[Weather Report] - SUNNY SKIES - LIGHT WIND - NO OTHER ALERTS");
  47.         case 8:format(string, sizeof(string), "[Weather Report] - WETNESS - FULL GAZES - NO OTHER ALERTS");
  48.         case 9:format(string, sizeof(string), "[Weather Report] - HEAVY FOG - STRONG WINDS - FINE SPELLS DEVELOPING IN THE EVENING");
  49.     }
  50.     SendClientMessageToAll(-1, string);  /* This client message display to all the players around the server that the weather has been changed */
  51.  
  52.     SetWeather(rand); /* This command allows the weather in-game to switch to a new randomized ID */
  53.    
  54.    
  55.     return 1;
  56. }
  57.  
  58. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement