[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", 60000, 1);
return 1;
}
forward AutoWeather();
public AutoWeather()
{
new var = random(49);
switch (var)
{
case 0: SetWeather(1);
case 1: SetWeather(2);
case 2: SetWeather(3);
case 3: SetWeather(4);
case 4: SetWeather(5);
case 5: SetWeather(6);
case 6: SetWeather(7);
case 7: SetWeather(8);
case 8: SetWeather(9);
case 9: SetWeather(10);
case 10: SetWeather(11);
case 11: SetWeather(12);
case 12: SetWeather(13);
case 13: SetWeather(14);
case 14: SetWeather(15);
case 15: SetWeather(16);
case 16: SetWeather(17);
case 17: SetWeather(18);
case 18: SetWeather(19);
case 19: SetWeather(20);
case 20: SetWeather(21);
case 21: SetWeather(22);
case 22: SetWeather(23);
case 23: SetWeather(24);
case 24: SetWeather(25);
case 25: SetWeather(26);
case 26: SetWeather(27);
case 27: SetWeather(28);
case 28: SetWeather(29);
case 29: SetWeather(30);
case 30: SetWeather(31);
case 31: SetWeather(32);
case 32: SetWeather(33);
case 33: SetWeather(34);
case 34: SetWeather(35);
case 35: SetWeather(36);
case 36: SetWeather(37);
case 37: SetWeather(38);
case 38: SetWeather(39);
case 39: SetWeather(40);
case 40: SetWeather(41);
case 41: SetWeather(42);
case 42: SetWeather(43);
case 43: SetWeather(44);
case 44: SetWeather(45);
case 45: SetWeather(46);
case 46: SetWeather(47);
case 47: SetWeather(48);
case 48: SetWeather(49);
case 49: SetWeather(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);