new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Data");
INI_WriteString(file,"Password",hashpass);
INI_WriteInt(file,"Admin",0);
INI_WriteInt(file,"Cash",0);
INI_WriteInt(file,"Vip",0);
INI_WriteInt(file,"Scores",0);
INI_WriteInt(file,"Deaths",0);
INI_WriteInt(file,"Nopm",0);
INI_WriteInt(file,"Muted",0);
INI_WriteInt(file,"Vip",0);
INI_WriteInt(file,"Banned",0);
INI_WriteInt(file,"Cookies",0);
INI_WriteInt(file,"Warn",0);
INI_WriteInt(file,"Jailed", 0);
INI_WriteInt(file,"Logged", 1);
INI_WriteInt(file,"AdminActions", 0);
INI_WriteInt(file, "Rank", 0);
INI_WriteInt(file, "RegisterDate_day", Day);
INI_WriteInt(file, "RegisterDate_mon", Month);
INI_WriteInt(file, "RegisterDate_year",Year);
INI_WriteInt(file, "RegisterDate_hour",Hour);
INI_WriteInt(file, "RegisterDate_min", Minute);
INI_WriteInt(file, "RegisterDate_sec", Second);
INI_WriteInt(file,"Taxes",0);
INI_Close(file);
format(temp, sizeof(temp), "{FFFFFF}Register Date: {FEFA07}%02d:%02d:%02d - %02d:%02d:%02d\n",pInfo[playerid][RegisterDate_day],pInfo[playerid][RegisterDate_mon],pInfo[playerid][RegisterDate_year],pInfo[playerid][RegisterDate_hour],pInfo[playerid][RegisterDate_min],pInfo[playerid][RegisterDate_sec]);
INI_Int("RegisterDate_day", pInfo[playerid][RegisterDate_day]);
INI_Int("RegisterDate_mon", pInfo[playerid][RegisterDate_mon]);
INI_Int("RegisterDate_year", pInfo[playerid][RegisterDate_year]);
INI_Int("RegisterDate_hour", pInfo[playerid][RegisterDate_hour]);
INI_Int("RegisterDate_min", pInfo[playerid][RegisterDate_min]);
INI_Int("RegisterDate_sec", pInfo[playerid][RegisterDate_sec]);
I don't know what the problem is, but I would store the registration date/time in UNIX timestamp format.
|
new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
new hashpass[129];
new currenttime[25];
format(currenttime, sizeof(currenttime), "%02d:%02d:%02d - %02d/%02d/%d", Hour, Minute, Second, Day, Month, Year);
WP_Hash(hashpass,sizeof(hashpass),inputtext);
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Data");
INI_WriteString(file,"Password",hashpass);
INI_WriteInt(file,"Admin",0);
INI_WriteInt(file,"Cash",0);
INI_WriteInt(file,"Vip",0);
INI_WriteInt(file,"Scores",0);
INI_WriteInt(file,"Deaths",0);
INI_WriteInt(file,"Nopm",0);
INI_WriteInt(file,"Muted",0);
INI_WriteInt(file,"Vip",0);
INI_WriteInt(file,"Banned",0);
INI_WriteInt(file,"Cookies",0);
INI_WriteInt(file,"Warn",0);
INI_WriteInt(file,"Jailed", 0);
INI_WriteInt(file,"Logged", 1);
INI_WriteInt(file,"AdminActions", 0);
INI_WriteInt(file, "Rank", 0);
INI_WriteString(file, "RegisterDate", currenttime);
INI_WriteInt(file,"Taxes",0);
INI_Close(file);
INI_WriteInt(file, "RegisterDate", gettime());