SA-MP Forums Archive
[SOLVED]Function: getdate - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Function: getdate (/showthread.php?tid=154744)



[SOLVED]Function: getdate - Naxix - 15.06.2010

Alright, so i made this:
Код:
new Year,Month,Day;
getdate(Year, Month, Day);
format(string,sizeof(string),"%d/%d/%d",Year,Month,Day);
dini_IntSet(file,"Date",string);
To save the date of e.g when the players register and such.
So my question is, would you be able to do like this:
Код:
new Year,Month,Day;
getdate(Year, Month+1, Day);
format(string,sizeof(string),"%d/%d/%d",Year,Month,Day);
dini_IntSet(file,"Date",string);
So that you get the date plus a month, so you would be able to compare that with something like:

Код:
new Year,Month,Day;
getdate(Year,Month,Day);
format(string,sizeof(string),"%d/%d/%d",Year,Month,Day);
if(!strcmp(string,dini_Get(file,"Date"),true))
So you can get the time when they register and compare that when they like login, and then after 1 month you cut get the date and say like "congratulations you been here for a month" (Just an example).

Would this be possible?