how to save date in variable and check getdate(year, month, day); if(varible < day)
#1

how to save date in variable and check getdate(year, month, day); if(varible < day)
sorry for my english
Reply
#2

Try the code below, and edit it to your likings.

pawn Код:
new date[4];

// Put this snippet where you want it.
new year, month, day;
getdate(year, month, day);
date[0] = year;
date[1] = month;
date[2] = day;

stock PayDay() // For example.
{
    new year, month, day;
    getdate(year, month, day);
    if(date[2] < day) // If the day set in 'GetDate' is lower than the current day, let's say date[2] was 26, and 'day' was 30.
    {
        // Code here.
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)