Auto login....
#4

pawn Code:
public OnPlayerConnect(playerid)
{
    if(fexist(PlayerName(playerid)) //The username is used
    {
        new plrIP[16];
        GetPlayerIp(playerid, plrIP, sizeof(plrIP));
       
        if(!strcmp(plrIP, pInfo[playerid][PlayerIP]) //The IP matches
        {
            //IP and username matches. Login player, give money, score, etc..
        }
        else //IP doesn't match
        {
            ShowPlayerDialog(//Show login dialog...)
        }
    }
    else //There is no file that has the same name as the player (Player is not registered)
    {
        //Show register dialog
    }
    return 1;
}
Reply


Messages In This Thread
Auto login.... - by karemmahmed22 - 23.09.2015, 19:54
Re: Auto login.... - by [XST]O_x - 23.09.2015, 20:04
Re: Auto login.... - by karemmahmed22 - 23.09.2015, 20:07
Re: Auto login.... - by [XST]O_x - 23.09.2015, 20:12
Re: Auto login.... - by karemmahmed22 - 23.09.2015, 20:23

Forum Jump:


Users browsing this thread: 1 Guest(s)