09.12.2009, 10:29
Just count the second of the year^^
pawn Код:
new MonthDays[12]=
{
31,//Januar
28,//Februar
31,//Maerz
30,//April
31,//Mai
30,//Juni
31,//Juli
31,//August
30,//September
31,//Oktober
30,//November
31//Dezember
};
stock GetYearSecond()
{
new d,m,y,h,s,ys;
gettime(h,m,s);
ys=s;
ys+=m*60;
ys+=h*60*60;
getdate(y,m,d);
ys+=(d-1)*24*60*60;
for(new i=0;i<(m-1);i++)
ys+=MonthDays[i]*24*60*60;
return ys;
}