SA-MP Forums Archive
Help with time... - 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: Help with time... (/showthread.php?tid=504959)



Help with time... - GuyYahood1 - 06.04.2014

Hello,

I wanna to count how much hours and minutes between:
16:00 Today until 13:00 Tommorow.

thanks for help.


Re: Help with time... - doreto - 06.04.2014

16 -13 = ?


Re: Help with time... - AroseKhanNiazi - 06.04.2014

21 hours


Re: Help with time... - GuyYahood1 - 06.04.2014

But I want to do it in Pawn...


AW: Help with time... - Nero_3D - 06.04.2014

Do you just want it to work for today and tomorrow or in general from date x to y

For today and tomorrow it just would be
pawn Код:
new
    todayhour = 16,
    todaymin = 0,
    tomorrowhour = 13,
    tomorrowmin = 0,
    difference = (tomorrowhour + 24 - todayhour) * 60 + tomorrowmin - todaymin,
    differencehour = difference / 60,
    differencemin = difference % 60
;