Auto login....
#5

Thanks for helping me repped:P, Heres my code it might help someone :P
PHP Code:

    
if(fexist(UserPath(playerid)))
    {
        
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
        new 
IP[16];
        
GetPlayerIp(playeridIPsizeof(IP));
        if(!
strcmp(IPPlayerInfo[playerid][pIP])) 
        {
            
IsLogged[playerid] = 1;
        }
        else
        {
            
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"Login","Welcome Back\nType your password to login.\nIf its not your account, Please quit the game and join with another nickname.","Login","Quit");
            
SendClientMessage(playerid,COLOR_YELLOW,"This account is registered.");
            
SendClientMessage(playerid,COLOR_RED,"If its not your account, Please exit the game and join with another nickname.");
        }
    }

    else
    {
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,"Register","Please register to continue\nType your password to register.\nPlease don't use easy passwords.","Register","Quit");
        
SendClientMessage(playerid,COLOR_YELLOW,"This account is not registered");
        
SendClientMessage(playerid,COLOR_YELLOW,"Please register it by typing your password in register dialog.");
    } 
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)