28.07.2017, 14:20
Bom nгo tem segredo:
PHP код:
new dia[MAX_PLAYERS];
new mes[MAX_PLAYERS];
new ano[MAX_PLAYERS];
new hora[MAX_PLAYERS];
new minuto[MAX_PLAYERS];
new segundo[MAX_PLAYERS];
// em onplayerconnect, vamos salvar nas variaveis quando ele logou a ultima vez.
getdate(ano[playerid],mes[playerid],dia[playerid]);
gettime(hora[playerid], minuto[playerid], segundo[playerid]);
// agora vamos falar ao player quando ele logou da ultima vez
new string[128];
format(string, 128, "Ultimo login: %02d/%02d/%04d as %02d:%02d", DOF2_GetInt(arq, "dia"),DOF2_GetInt(arq, "mes"),DOF2_GetInt(arq, "ano"),DOF2_GetInt(arq, "hora"),DOF2_GetInt(arq, "minuto") );
SendClientMessage(playerid, -1, string);
// pronto, depois que vc ja falou a ultima vez que ele logou, vai salvar esse ultimo login dele.
DOF2_SetInt(arq,"dia",dia[playerid]);
DOF2_SetInt(arq,"mes",mes[playerid]);
DOF2_SetInt(arq,"ano",ano[playerid]);
DOF2_SetInt(arq,"hora",hora[playerid]);
DOF2_SetInt(arq,"minuto",minuto[playerid]);
DOF2_SetInt(arq,"segundo",segundo[playerid]);
DOF2_SaveFile();