29.01.2014, 19:39
Quote:
Tambйm й possivel em Mysql ou SQLite mais vocк tem que fazer um sistema prуprio pois nгo sei se existe algum ja feito... Uma coisa que eu digo! Servidor que apaga contas й tragico...
|
Quote:
a e mesmo confundir mais pra fala a verdade eu queria uma include so pra contar os dias porque aquela include nгo vai deletar o que o player tem ex casa , portao , carro
|
pawn Код:
public OnPlayerConnect(playerid) {
new local[35], Nome[24];
GetPlayerName(playerid, Nome, 24);
format (local, 35, "Contas/%s.ini", Nome);
if ( fexist(local)) {
new time_off = DOF2_GetInt(local, "lastLogin"), str[50];
time_off = (((gettime() - time_off) / 60) / 60) / 24; // crйditos ao Paulor
if ( time_off == 0 )
SendClientMessage(playerid, -1, "Seu ъltimo login foi a menos de 24 horas!");
else
format (str, sizeof str, "Vocк ficou inativo por aproximadamente %d dia(s)!", time_off), SendClientMessage(playerid, -1, srt);
DOF2_SetInt(local, "lastLogin", gettime() );
DOF2_SaveFile();
}
return 1;
}
Uma pequena base, nгo testei.
Vocк deve acrescentar no seu sistema de registro:
pawn Код:
new local[35], Nome[24];
GetPlayerName(playerid, Nome, 24);
format (local, 35, "Contas/%s.ini", Nome);
DOF2_SetInt(local, "lastLogin", gettime() );
DOF2_SaveFile();