SALVAR: new Str[100], NomePlayer[21]; new pano[32], pmes[32], pdia[32]; strmid(pano, PlayerInfo[playerid][UltimoLogin], 6, 10, 32); strmid(pmes, PlayerInfo[playerid][UltimoLogin], 0, 2, 32); strmid(pdia, PlayerInfo[playerid][UltimoLogin], 3, 5, 32); new ano = strval(pano); new mes = strval(pmes); new dia = strval(pdia); getdate(ano,mes,dia); format(PlayerInfo[playerid][UltimoLogin], 32, "%02d/%02d/%d", dia, mes, ano); GetPlayerName(playerid, NomePlayer, 20); format(Str, sizeof(Str), "UPDATE `contas` SET `UltimoLogin`='%s' WHERE Nome='%s'", PlayerInfo[playerid][UltimoLogin], NomePlayer); mysql_tquery(Connect, Str); |
PUXAR DADOS: PlayerInfo[playerid][UltimoLogin] = cache_get_field_content_int(0, "UltimoLogin"); |
MOSTRAR ULTIMO LOGIN: new Str2[600]; GetPlayerName(playerid, NomePlayer, 20); format(Str2, sizeof(Str2), "Olб {4682B4}%s{ffffff}, seu ъltimo login foi %d", NomePlayer, PlayerInfo[playerid][UltimoLogin]); SendClientMessage(playerid, -1, Str2); |
new string[128];
SendClientMessage(playerid, -1, "-----------------------------------------------------------------------------------------------------");
format(cadena, sizeof(string), "Olб {00CCFF}%s{FFFFFF}, te vimos pela ultima vez em %02d-%02d-%02d de %02d:%02d:%02d", NomePlayer(playerid), PlayerInfo[playerid][jAno], PlayerInfo[playerid][jMes], PlayerInfo[playerid][jDia], PlayerInfo[playerid][jHora], PlayerInfo[playerid][jMinuto], PlayerInfo[playerid][jSegundo]);
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid, -1, "-----------------------------------------------------------------------------------------------------");
ReturnDate(style) { static date[36]; getdate(date[2], date[1], date[0]); gettime(date[3], date[4], date[5]); if(style == 1) format(date, sizeof(date), "%02d/%02d/%d аs %02d:%02d", date[0], date[1], date[2], date[3], date[4]); if(style == 2) format(date, sizeof(date), "%02d/%02d/%d", date[0], date[1], date[2]); return date; }