Time difference in minutes
#1

Hello,
I need the function GetTimeDifference(minute, second, day, month, year)
This function should return the difference from the current time in minutes.
I have it with days, but minutes would be better for my plan.

Thank you!

PHP код:
stock GetDateDifference(daymonthyear)
{
    new 
tDaytMonthtYeardays;
    
getdate(tYeartMonthtDay);
    
loop_start:
    if(
day != tDay || month != tMonth || year != tYear)
    {
        
days++;
        
day++;
        if(
day>28 && month == 2)
        {
            
day=1;
            
month++;
        }
        if(
day>30 && (month == || month == || month == || month == 11))
        {
            
day=1;
            
month++;
        }
        if(
day>31 && (month == || month == || month == || month == || month == || month == 10 ||  month == 12))
        {
            
day=1;
            
month++;
        }
        if(
month>12)
        {
            
day=1;
            
month=1;
            
year++;
        }
        goto 
loop_start;
    }
    return 
days;

Reply
#2

Thanks for you answer. I will use this plugin: https://sampforum.blast.hk/showthread.php?tid=294054
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)