Guest User

SA-MP Filterscript; Random Weather System

a guest
Jun 20th, 2014
1,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. forward AutoWeather();
  4.  
  5. #if defined FILTERSCRIPT
  6.  
  7. public OnFilterScriptInit()
  8. {
  9. SetTimer("AutoWeather", 60000, 1);
  10. return 1;
  11. }
  12.  
  13. public OnFilterScriptExit()
  14. {
  15. KillTimer(AutoWeather);
  16. return 1;
  17. }
  18.  
  19. #else
  20.  
  21. main()
  22. {
  23. print("\n----------------------------------");
  24. print(" Automatic Weather System By Ciandlah");
  25. print("----------------------------------\n");
  26. }
  27.  
  28. public AutoWeather()
  29. {
  30. new rand = random(15);
  31. new string[256];
  32. format(string, sizeof(string), "Server Note: The weather ID has been change to %d, please wait an hour before the next weather switch.", rand);
  33. SendClientMessageToAll(-1, string);
  34. SetWeather(rand);
  35. return 1;
  36. }
  37.  
  38. #endif
Advertisement
Add Comment
Please, Sign In to add comment