MKTime - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MKTime (
/showthread.php?tid=291081)
MKTime -
gedux123775 - 18.10.2011
Hi, how do that, if I got number 1264489, how decrypted week,days,hours,minutes. Please help and ty.
Re: MKTime -
Pharrel - 18.10.2011
what is 1264489? seconds?
Re: MKTime -
gedux123775 - 18.10.2011
Yes.
Re: MKTime -
nilanjay - 18.10.2011
You need to use little maths here. Try to change second into minutes then hours.
Re: MKTime -
Pharrel - 18.10.2011
pawn Code:
new time = 1264489;
new days,hours,minutes;
while (time >= 86400)
{
days++;
time-=86400;
}
while(time >= 3600)
{
hours++;
time-=3600;
}
while(time >= 60)
{
minutes++;
time-=60;
}
format(string, 44,"%d Days - %d Hours - %d Minutes - %d Seconds",days, hours, minutes, time);
Re: MKTime -
gedux123775 - 18.10.2011
Ty very much
))