Getting date problem (+rep)
#1

Hello Guys.I maked simple script for getting date.

pawn Код:
new godina, mesec, den, maxdenovi, maxsaati;
    day= 31;
                month = 12;
                year = 2014;
                hour = 23;
                minute = 15;
pawn Код:
switch(mesec)
                {
                    case 1, 3, 5, 7, 8, 10, 12: maxdenovi = 31;
                    case 4, 6, 9, 11: maxdenovi = 30;
                    case 2: maxdenovi = ((!(godina % 4)) ? (29) : (28));
                }
                if((den += 15) > maxdenovi) den -= maxdenovi, mesec++;
                if(mesec > 12) mesec -= 12, godina++;
                if(saat > 23) saat -= 23, den++;
                if(den  > maxdenovi) den  -= maxdenovi, mesec++;
                if(mesec > 12) mesec -= 12, godina++;
                if(minuta > 60) minuta -= 60, saat++;
den - day
maxdenovi - maxdays
godina - year
mesec - month


Right now i have String SendMessage

pawn Код:
SCMF(playerid, COLOR_WHITE, "{00C0FF}[INFO]{FFFFFF} Go podignavte vasiot pasos koj sto trae do %d/%d/%d %d:%d",den,mesec,godina,vadenjesaat,vadenjeminuta);
I maked if the maxhour is 24 hours and if hour is hour > 24) day++; but didnt work.Example for my code 31.12.2014 23:15 and i have maked +1 hour to get the passport.Right now he say me The passport will be done at: 31.12.2014 at 24:15 i changed the maxhour to 23 and didnt work again.Can anyone help me to make in place of 31.12.2014 at 24:15 to say 01.01.2015 at 00:15
Reply


Messages In This Thread
Getting date problem (+rep) - by ScripteRMKD - 01.12.2014, 13:28
Re: Getting date problem (+rep) - by Runn3R - 01.12.2014, 18:28
Re: Getting date problem (+rep) - by ScripteRMKD - 01.12.2014, 20:06
Re: Getting date problem (+rep) - by mati233 - 01.12.2014, 20:13
Re: Getting date problem (+rep) - by ScripteRMKD - 01.12.2014, 20:24
Re: Getting date problem (+rep) - by Capua - 01.12.2014, 20:30
Re: Getting date problem (+rep) - by AnthonyTimmers - 01.12.2014, 20:55
Re: Getting date problem (+rep) - by zT KiNgKoNg - 01.12.2014, 21:01
Re: Getting date problem (+rep) - by mati233 - 01.12.2014, 21:32
Re: Getting date problem (+rep) - by AnthonyTimmers - 01.12.2014, 22:49

Forum Jump:


Users browsing this thread: 1 Guest(s)