23.09.2015, 20:23
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(playerid, IP, sizeof(IP));
if(!strcmp(IP, PlayerInfo[playerid][pIP]))
{
IsLogged[playerid] = 1;
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_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(playerid, DIALOG_REGISTER, DIALOG_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.");
}