22.07.2014, 10:13
well there is a way of doint it
so here is it how it is done
Use unix time stamps you can read them about them here https://sampforum.blast.hk/showthread.php?tid=254915
so here is an example of how to do it
so here is it how it is done
Use unix time stamps you can read them about them here https://sampforum.blast.hk/showthread.php?tid=254915
so here is an example of how to do it
pawn Код:
public OnPlayerDisconnect(playerid)
{
new last = gettime();
new IP[16+1];
GetPlayerIp(playerid, IP, sizeof(IP));
//now save the these both in file //
//we will be loading them on player connect
return 1;
}
public OnPlayerConnect
{
//load the varaibes which we saved suppose you loaded them in Player[playerid[LastLoggedIn] and Player[playerid][IP]
new nip[17];
GetPlayerIp(playerid, nip, 17);
if(!strcmp(Player[playerid][IP], nip, true) && Player[playerid][LastLoggedIn] <= (60*120)/*2 hours*/)
{
//auto login procedure here
return 1;
}
//login procedure
return 1;
}