[FilterScript] [FS]wheather system
#1

a simple and easy to read wheater system.
even begginers can see how it works.
maybe ima make a update with dialogs for admins.
cyu
code:
Код:
#define FILTERSCRIPT
#include <a_samp>
forward WheaterCalc();
forward WheaterUpdate();
new temp;
public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" random weather system by [LD]Legodude");
	print("--------------------------------------\n");
	SetTimer("WheaterCalc",60000, true);
 	temp = 6;
	return 1;
}

public OnFilterScriptExit()
{
  SetWeather(1);
  print("\n-------------------------------------------------");
	print(" weather system unloaded. weather is set to sunny");
	print("-------------------------------------------------\n");
	return 1;
}

public WheaterCalc()
{
	if(temp == 16)
	{
	  temp--;
	}
	else if(temp == 1)
	{
	  temp++;
	}
	else
	{
  	new positiveornegative = random(10000);
  	if(positiveornegative >= 5000)
  	{
  	  temp++;
  	}
  	else
  	{
  	  temp--;
  	}
	}
  CallLocalFunction("WheaterUpdate","");
	return 1;
}

public WheaterUpdate()
{
	switch(temp)
	{
	  case 1:
	  {
	    SetWeather(1);
	  }
	  case 4:
	  {
	    SetWeather(4);
	  }
	  case 8:
	  {
	    SetWeather(8);
	  }
	  case 9:
	  {
	    SetWeather(9);
	  }
	  case 16:
	  {
	    SetWeather(16);
	  }
	}
	return 1;
}
Reply


Messages In This Thread
[FS]wheather system - by legodude - 16.05.2010, 12:07
Re: [FS]wheather system - by ^Woozie^ - 16.05.2010, 12:27
Re: [FS]wheather system - by legodude - 16.05.2010, 12:28
Re: [FS]wheather system - by legodude - 16.05.2010, 12:29
Re: [FS]wheather system - by W00Z - 04.06.2010, 11:40
Re: [FS]wheather system - by Shadow_ - 04.06.2010, 15:54
Re: [FS]wheather system - by legodude - 10.06.2010, 14:15
Re: [FS]wheather system - by Jofi - 11.06.2010, 09:28
Re: [FS]wheather system - by Thrarod - 11.06.2010, 10:19
Re: [FS]wheather system - by Hiddos - 11.06.2010, 13:17

Forum Jump:


Users browsing this thread: 2 Guest(s)