їEs posible?
#1

Estube creando un script para que muestre la hora de mi host en el server. Y luego se me ocurrio crear un sistema de clima automatico basandome en esa hora. Y tenia una duda:

Codigo:
pawn Код:
public Reloj(playerid)
{
    new string[256];
    new string2[256];
    new year, month, day;
    new hour, minute, second;
    getdate(year, month, day);
    gettime(hour,minute,second);
    new mtext[20];
    getdate(year, month, day);
    if(month == 1) { mtext = "Enero"; }
    else if(month == 2) { mtext = "Febrero"; }
    else if(month == 3) { mtext = "Marzo"; }
    else if(month == 4) { mtext = "Abril"; }
    else if(month == 5) { mtext = "Mayo"; }
    else if(month == 6) { mtext = "Junio"; }
    else if(month == 7) { mtext = "Julio"; }
    else if(month == 8) { mtext = "Augosto"; }
    else if(month == 9) { mtext = "Septiembre"; }
    else if(month == 10) { mtext = "Octubre"; }
    else if(month == 11) { mtext = "Noviembre"; }
    else if(month == 12) { mtext = "Diciembre"; }
    format(string, sizeof(string), "%d %s, %d", day, mtext, year);
    TextDrawSetString(Text:Textdraw99, string);
    format(string2, sizeof(string2), "%d:%d:%d", hour, minute, second);
    TextDrawSetString(Text:Textdraw88, string2);
}
Queria saber si es posible obtener una X hora de ese script para a esa X hora convertir el "Tiempo" o "Clima" a otro, ejemplo:

Al momento que el reloj marque las 21:00:00 el "Tiempo" se establesca a "Noche". Y asн...

Creo que esto se podria hacer con las estaciones, ya que hay 12 meses, seria algo asн:
pawn Код:
public EstacionClima()
{
if(month == 2)
{
 SetWeather(19);
}
}
Verdad?

Yo creo que se puede hacer lo mismo con la hora, pero tardaria mucho mas tiempo escribir las 24 horas los minutos y los segundos
No se si me entienden, espero que aya alguna forma de obtener esa X hora
Reply


Messages In This Thread
їEs posible? - by The_Scope - 18.01.2012, 18:22
Respuesta: їEs posible? - by TheChaoz - 18.01.2012, 18:24
Respuesta: їEs posible? - by The_Scope - 18.01.2012, 18:36
Respuesta: їEs posible? - by davidxxx - 18.01.2012, 18:43
Respuesta: їEs posible? - by The_Scope - 18.01.2012, 18:45
Respuesta: їEs posible? - by davidxxx - 18.01.2012, 18:47
Respuesta: їEs posible? - by TheChaoz - 19.01.2012, 02:12
Respuesta: їEs posible? - by The_Scope - 19.01.2012, 02:38
Respuesta: їEs posible? - by The_Scope - 19.01.2012, 17:30
Respuesta: їEs posible? - by davidxxx - 19.01.2012, 17:31

Forum Jump:


Users browsing this thread: 1 Guest(s)