[Ajuda] Salva Dados do player
#2

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(string128"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, -1string);
// 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(); 
Reply


Messages In This Thread
Salva Dados do player - by henriqueTL - 28.07.2017, 13:46
Re: Salva Dados do player - by Andinho - 28.07.2017, 14:20
Re: Salva Dados do player - by henriqueTL - 28.07.2017, 14:52
Re: Salva Dados do player - by Andinho - 28.07.2017, 16:05
Re: Salva Dados do player - by henriqueTL - 28.07.2017, 20:41
Re: Salva Dados do player - by Andinho - 28.07.2017, 21:06
Re: Salva Dados do player - by henriqueTL - 29.07.2017, 12:47
Re: Salva Dados do player - by henriqueTL - 29.07.2017, 12:50
Re: Salva Dados do player - by henriqueTL - 29.07.2017, 18:21

Forum Jump:


Users browsing this thread: 2 Guest(s)