auto restart script
#7

GMT +3 (i think) Romania Bucharest

i already have something to display realtime hour /date

pawn Код:
public settime(){
    new hour,minute,second;
    new string[256];
    gettime(hour,minute,second);
    if (minute <= 9){format(string,25,"%d:0%d",hour,minute);}
    else {format(string,25,"%d:%d",hour,minute);}
    TextDrawSetString(Ora,string);
    //
    if (minute <= 9){format(string,25,":%d",second);}
    else {format(string,25,":%d",second);}
    TextDrawSetString(Secunde,string);
    //
    SetWorldTime(hour);
    new day, month, year;
    new weekday;
    getdate(day, month, year);
    weekday = GetWeekdayNum(day, month, year);
    if(weekday == 1){TextDrawSetString(Zile,"Vineri");}
    if(weekday == 2){TextDrawSetString(Zile,"Sambata");}
    if(weekday == 3){TextDrawSetString(Zile,"Duminica");}
    if(weekday == 4){TextDrawSetString(Zile,"Luni");}
    if(weekday == 5){TextDrawSetString(Zile,"Marti");}
    if(weekday == 6){TextDrawSetString(Zile,"Miercuri");}
    if(weekday == 7){TextDrawSetString(Zile,"Joi");}
    return 1;
}

ORA means hour ,Zile means days
Reply


Messages In This Thread
auto restart script - by rekatluos - 07.08.2011, 14:35
Re: auto restart script - by Kingunit - 07.08.2011, 14:43
Re: auto restart script - by THE_KNOWN - 07.08.2011, 14:57
Re: auto restart script - by rekatluos - 07.08.2011, 16:11
Re: auto restart script - by grand.Theft.Otto - 07.08.2011, 16:55
Re: auto restart script - by Kingunit - 07.08.2011, 18:22
Re: auto restart script - by rekatluos - 07.08.2011, 18:31
Re: auto restart script - by linuxthefish - 07.08.2011, 18:35
Re: auto restart script - by Kingunit - 07.08.2011, 18:35
Re: auto restart script - by rekatluos - 07.08.2011, 18:36

Forum Jump:


Users browsing this thread: 1 Guest(s)