SA-MP Forums Archive
[FilterScript] [FS] AutoMatic Weather - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] AutoMatic Weather (/showthread.php?tid=298111)



[FS] AutoMatic Weather - forgottenkings - 19.11.2011

Hey guys im from forgottenkings clan im here to share a fs on weather chaning! IT will change every 1 minute

PHP код:
#include a_samp
public OnGameModeInit()
{
    
SetTimer("AutoWeather"600001);
    return 
1;
}
forward AutoWeather();
public 
AutoWeather()
{
   new var = 
random(49);
   switch (var)
   {
     case 
0SetWeather(1);
     case 
1SetWeather(2);
     case 
2SetWeather(3);
     case 
3SetWeather(4);
     case 
4SetWeather(5);
     case 
5SetWeather(6);
     case 
6SetWeather(7);
     case 
7SetWeather(8);
     case 
8SetWeather(9);
     case 
9SetWeather(10);
     case 
10SetWeather(11);
     case 
11SetWeather(12);
     case 
12SetWeather(13);
     case 
13SetWeather(14);
     case 
14SetWeather(15);
     case 
15SetWeather(16);
     case 
16SetWeather(17);
     case 
17SetWeather(18);
     case 
18SetWeather(19);
     case 
19SetWeather(20);
     case 
20SetWeather(21);
     case 
21SetWeather(22);
     case 
22SetWeather(23);
     case 
23SetWeather(24);
     case 
24SetWeather(25);
     case 
25SetWeather(26);
     case 
26SetWeather(27);
     case 
27SetWeather(28);
     case 
28SetWeather(29);
     case 
29SetWeather(30);
     case 
30SetWeather(31);
     case 
31SetWeather(32);
     case 
32SetWeather(33);
     case 
33SetWeather(34);
     case 
34SetWeather(35);
     case 
35SetWeather(36);
     case 
36SetWeather(37);
     case 
37SetWeather(38);
     case 
38SetWeather(39);
     case 
39SetWeather(40);
     case 
40SetWeather(41);
     case 
41SetWeather(42);
     case 
42SetWeather(43);
     case 
43SetWeather(44);
     case 
44SetWeather(45);
     case 
45SetWeather(46);
     case 
46SetWeather(47);
     case 
47SetWeather(48);
     case 
48SetWeather(49);
     case 
49SetWeather(50);
   }




Re: [FS] AutoMatic Weather - Be$$0n - 19.11.2011

PHP код:
public AutoWeather()
{
SetWeather(random(49));

?


Re: [FS] AutoMatic Weather - Prumpuz - 19.11.2011

Could be more simple, could have been done like:
pawn Код:
#include a_samp

public OnGameModeInit()
{
    SetTimer("AutoWeather", 60000, 1);
    return 1;
}

forward AutoWeather();
public AutoWeather()
{
   new var = random(50);
   SetWeather(var);
}
But well, your way works as well. Very nice.

Edit: Be$$0n beat me to it.


Re: [FS] AutoMatic Weather - BaubaS - 19.11.2011

pawn Код:
public AutoWeather()
{
SetWeather(random(51));
}
*


Re: [FS] AutoMatic Weather - forgottenkings - 19.11.2011

well what could do but i was using mine as a selection of weathers for posting here i just putted some more and i know this code :P


Re: [FS] AutoMatic Weather - YoUnG_KiD - 19.11.2011

Nice One Dude...


Re: [FS] AutoMatic Weather - Astralis - 19.11.2011

Dude,your releasing simple but nice scripts.


Re: [FS] AutoMatic Weather - Reix[EST] - 27.11.2011

10/10 Thanks for sharing!


Re: [FS] AutoMatic Weather - Basssiiie - 27.11.2011

There are a lot of weird weathers between 35 and 45, you know? Weathers like purple/pink sky or just total redness. (You can't see anything) I also use a script to have random weather, but it's quite a pain to filter all those weird weather ID's.


AW: [FS] AutoMatic Weather - BigETI - 27.11.2011

You can use
pawn Код:
stock Choose(_:...) return getarg(random(numargs()));
Example Usage:
pawn Код:
#define MyWeather Choose(2, 5, 6, 7, 8, 9, 12, 20, 22)
stock Choose(_:...) return getarg(random(numargs()));
public OnFilterScriptInit()
{
    SetWeather(MyWeather);
    SetTimer("AutoWeather", 60000, 1);
    return 1;
}
forward AutoWeather();
public AutoWeather() SetWeather(MyWeather);