[Pedido] Deixar Um Tempo Randomico (Sol,Chuva,Nublado,Noite,Tarde)
#5

Quote:
Originally Posted by FreeGells
Посмотреть сообщение
Tenta ai, nгo testei.

Код:
#include < a_samp >

forward RandomWeather ( ) ;

public RandomWeather ( )
{
	new 
		rand = 1 + random ( 5 ) ;

    switch ( rand )    
    {         
    	case 1:         
    	{             
    		SetWeather ( 1 ) ; // Sol            
    		SetTimer ( "RandomWeather", 300000, false ) ;         
   		}
		case 2:         
		{             
			SetWeather ( 8 ) ; // Chuva
			SetTimer ( "RandomWeather", 180000, false ) ;        
		}     
		case 3:
		{
			SetWeather ( 20 ) ; // Nublado
			SetTimer ( "RandomWeather ", 300000, false ) ;
		}
		case 4:
		{
			SetWorldTime ( 12 ) ; // Dia
			SetTimer ( "RandomWeather", 180000, false ) ;
		}
		case 5:
		{
			SetWorldTime ( 0 ) ; // Noite
			SetTimer ( "RandomWeather", 180000, false ) ;
		}
	}     
	return 1 ; 
}
Vlw Mano!!! Rep+
Reply


Messages In This Thread
Deixar Um Tempo Randomico (Sol,Chuva,Nublado,Noite,Tarde) - by Pietrotm2012 - 05.01.2013, 15:43
Re: Deixar Um Tempo Randomico (Sol,Chuva,Nublado,Noite,Tarde) - by FreeGells - 05.01.2013, 16:21
Re: Deixar Um Tempo Randomico (Sol,Chuva,Nublado,Noite,Tarde) - by TreePuncher - 05.01.2013, 16:25
Re: Deixar Um Tempo Randomico (Sol,Chuva,Nublado,Noite,Tarde) - by Etton - 05.01.2013, 16:29
Re: Deixar Um Tempo Randomico (Sol,Chuva,Nublado,Noite,Tarde) - by Pietrotm2012 - 05.01.2013, 17:55

Forum Jump:


Users browsing this thread: 1 Guest(s)