02.12.2011, 17:50
How would I go about doing something like that? Creating a string variable that saves the date like: 01/02/1970? I'm new to Y_INI, so I don't know how I would go about doing this.
LastLoggedIn = 12/2/2011 |
format(string, sizeof(string), "You last logged in on: %s!\nYou currently have %d points to spend!", UserInfo[playerid][LastLoggedIn], UserInfo[playerid][Points]);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX, ""COL_WHITE"You have been logged in!", string, "Play", "");
new year, month, day;
getdate(year, month, day);
new string[128];
format(string, sizeof(string), "%d/%d/%d", month, day, year);
INI_WriteString(File, "LastLoggedIn", string);
new
LastON[40],
Year,
Month,
Day,
Hour,
Minute,
Second;
getdate(Year,Month,Day);
gettime(Hour,Minute,Second);
format(LastON, sizeof LastON, "%d/%d/%d at %d:%d:%d", Day,Month,Year,Hour,Minute,Second);
INI_String("LastLoggedIn", UserInfo[playerid][LastLoggedIn], 64);
format(string, sizeof string, "Last logged in: %s", UserInfo[playerid][LastLoggedIn]);
SendClientMessage(playerid, ~1, string);