Auto login
#8

Just compare it directly.

pawn Код:
stock OnPlayerAutoLogin(playerid)
{
    format(File, sizeof(File), "/accountfiles/%s.sav", PlayerName[playerid]);
    AutoLogin = dini_Int(File, "AutoLogin");
    if(AutoLogin)
    {
        if(!strcmp(AccountInfo[playerid][aIP], dini_Get(File, "IP"))) return 1;
    }
    return 0;
}
Also in your OnPlayerConnect function, what's the point in doing that? Why not just save it directly to the variable in the first place? Like so:

pawn Код:
public OnPlayerConnect(playerid)
{
    GetPlayerIp(playerid, AccountInfo[playerid][aIP], sizeof(AccountInfo[playerid][aIP]));

    return 1;
}
Lastly, moved to the right section.
Reply


Messages In This Thread
Auto login - by Battleman - 01.01.2011, 22:52
Re: Auto login - by Marty_Alex - 01.01.2011, 22:57
Re: Auto login - by Battleman - 01.01.2011, 23:59
Re: Auto login - by Ironboy - 02.01.2011, 05:37
Re: Auto login - by Yagoda - 02.01.2011, 06:15
Re: Auto login - by Battleman - 02.01.2011, 12:50
Re: Auto login - by BlackBank - 02.01.2011, 14:04
Re: Auto login - by JaTochNietDan - 02.01.2011, 14:09
Re: Auto login - by Battleman - 02.01.2011, 22:48
Re: Auto login - by JaTochNietDan - 02.01.2011, 22:53

Forum Jump:


Users browsing this thread: 1 Guest(s)