Converting gettime(); to minutes and seconds
#1

Hello,

As I'm not really a fan of math, I forgot about the formula to calculate this.
Could anyone be so kind to help me?


Kind regards,

Kevin Houghton
Reply
#2

Uhm simply do this:
pawn Код:
new Hour, Minute, Second;
gettime(Hour, Minute, Second);
printf("%02d:%02d:%02d", Hour, Minute, Second);
 
new Seconds = gettime();
printf("Seconds since midnight 1st January 1970: %d", Seconds);
from: https://sampwiki.blast.hk/wiki/Gettime

or be more specific on what you want, good luck !
Reply
#3

I want to calculate how long it took to go from point A to point be, I've set a gettime(); at the start of point A, now when the player reaches point B, I need to calculate how long the player took to get from A to B with gettime();

Sorry I wasn't specific enough before.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)