Auto-login:
#3

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
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;
}
Reply


Messages In This Thread
Auto-login: - by Twizted - 22.07.2014, 09:48
Re: Auto-login: - by SKAzini - 22.07.2014, 10:03
Re: Auto-login: - by BroZeus - 22.07.2014, 10:13
Re: Auto-login: - by SKAzini - 22.07.2014, 10:19

Forum Jump:


Users browsing this thread: 1 Guest(s)