[FilterScript] [FS] AutoMatic Weather
#1

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);
   }

Reply
#2

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

?
Reply
#3

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.
Reply
#4

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

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
Reply
#6

Nice One Dude...
Reply
#7

Dude,your releasing simple but nice scripts.
Reply
#8

10/10 Thanks for sharing!
Reply
#9

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.
Reply
#10

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)