SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 18/10/2011, 12:31 PM   #1
gedux123775
Big Clucker
 
Join Date: Jun 2009
Posts: 84
Reputation: 0
Default MKTime

Hi, how do that, if I got number 1264489, how decrypted week,days,hours,minutes. Please help and ty.
gedux123775 is offline   Reply With Quote
Old 18/10/2011, 12:35 PM   #2
Pharrel
High-roller
 
Pharrel's Avatar
 
Join Date: Feb 2011
Location: Brazil
Posts: 1,530
Reputation: 135
Default Re: MKTime

what is 1264489? seconds?
__________________

"Afirmo que ambos somos ateus. Apenas acredito num deus a menos que você.
Quando você entender porque é que rejeita todos os outros deuses possíveis,
entenderá porque é que eu rejeito o seu."
Stephen Henry Roberts
Pharrel is offline   Reply With Quote
Old 18/10/2011, 12:38 PM   #3
gedux123775
Big Clucker
 
Join Date: Jun 2009
Posts: 84
Reputation: 0
Default Re: MKTime

Yes.
gedux123775 is offline   Reply With Quote
Old 18/10/2011, 12:40 PM   #4
nilanjay
Huge Clucker
 
Join Date: May 2011
Location: India
Posts: 365
Reputation: 13
Default Re: MKTime

You need to use little maths here. Try to change second into minutes then hours.
__________________

Releases

nilanjay is offline   Reply With Quote
Old 18/10/2011, 12:57 PM   #5
Pharrel
High-roller
 
Pharrel's Avatar
 
Join Date: Feb 2011
Location: Brazil
Posts: 1,530
Reputation: 135
Default Re: MKTime

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);
__________________

"Afirmo que ambos somos ateus. Apenas acredito num deus a menos que você.
Quando você entender porque é que rejeita todos os outros deuses possíveis,
entenderá porque é que eu rejeito o seu."
Stephen Henry Roberts
Pharrel is offline   Reply With Quote
Old 18/10/2011, 12:58 PM   #6
gedux123775
Big Clucker
 
Join Date: Jun 2009
Posts: 84
Reputation: 0
Default Re: MKTime

Ty very much ))
gedux123775 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mktime decode? Gh0sT_ Help Archive 0 19/07/2011 11:40 PM
Inverse function of mktime() Level147 Help Archive 4 17/02/2011 08:12 PM
Stuck on mktime .Com Help Archive 7 22/01/2011 07:19 PM
mktime to original date? Amit_B Help Archive 3 10/07/2009 01:09 AM


All times are GMT. The time now is 10:07 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.